What’s New in Visual Studio 2022 – IntelliCode Code Completions

What’s New in Visual Studio 2022 – IntelliCode Code Completions

In Visual Studio 2022 Preview 1 with the power of advanced IntelliCode, you can automatically complete a line of code at a time. IntelliCode is One of the new features of Visual Studio 2022 that can dramatically improve your coding productivity. It is an AI and ML-enabled coding engine that understands your coding context as you type your code, and predicts the complete line as you move. The IntelliCode model in Visual Studio 2022 trained over half a million open-source Github repos. It understands the library you are using, the object you are instantiating, variable names that you are referring and the overall context of your code and then predicts the next set of code which you can just select by pressing tab-tab.

Download Visual Studio 2022 Preview 1

Visual Studio 2022 IntelliCode Features

You can start experience this with Visual Studio 2022 Preview 1. Download the Preview Version and Open the code editor. Here, as soon as you start typing, it will start providing you the contextual suggestion and option to accept.

IntelliCode Code Completion in Visual Studio 2022
IntelliCode Code Completion in Visual Studio 2022

Consider one simple example, as shown in the below image. As soon as you type StringBuilder, it started predicting the complete line that creates an instance of StringBuilder. Once you press TAB + TAB it will accept and move to the next line. You can continue typing if you don’t want to accept it. Now, as soon as you accept the changes, by pressing the Tab Twice, it will complete the statement.

IntelliCode Code Completion in Visual Studio 2022

Now, once you come to the next line, Visual Studio automatically pick up the stringBuilder variable from the context and will predirct for your acceptance.

IntelliCode Code in Visual Studio 2022

Related Tip : Visual Studio 2022 is a 64-bit application. 

Once you press Tab and Accept that, as generally we start adding the text with in StringBuilder using StringBuilder.Append() method, you have the same prediction.

IntelliCode in VS 2022

One you use StringBuilder.Append() and add some text in the context, in the next state if you want to write it out, just type Console, the prediction engine will automatically recommend the complete line.

IntelliCode in VS 2022

This IntelliCode connect with Visual Studio backend services to keep updated with model and prediction.

10 Azure Cloud services that every Developers, Consultant, and Architects should Know and Learn it well

Subscribe To Newsletter For your Daily Development Tips and Tricks  

 Best Tips & Tricks on Microsoft Technology Platform 

Invalid email address
We promise not to spam you. You can unsubscribe at any time.
Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

One Comment to “What’s New in Visual Studio 2022 – IntelliCode Code Completions”

Comments are closed.