Visual Studio 2015 Update 2, released during //BUILD/2016 developer conference, provides an easy way to execute code directly on the Interactive Window inside the Visual Studio IDE. Along with that, the interactive window is now also capable of color highlighting.

 

Today in this blog post, we will learn how to execute code directly in the interactive window, in just a single click. Continue reading and let us know, how much you like this enhanced feature.

 

Execute code in Visual Studio 2015 (Update 2) Interactive Window is just a click away (www.kunal-chowdhury.com)

 

It’s time for you to upgrade to Visual Studio 2015. If you are already using the said version and/or new to it, try upgrading/installing directly to Visual Studio 2015 Update 2. You can download the web installer and/or the offline installer (ISO image) from this location: http://po.st/vs2015-update2.

 

Many time we have some situation when we need to run a specific block of code to check whether it’s executing as expected and this too without running the application or debugging the code. Visual Studio 2015 Update 2 allows you to do so directly from the context menu. It’s just a click away. Let’s see how to do this.

 

For example, you have a piece of code that you want to directly execute in the interactive window. You can set the default values that you want to specify to execute that block. Select the code block –> Right click on it –> from the context menu that pops up on the screen, find out the menu item that says “Execute in Interactive” (as shown in the below screenshot) and click on it. Alternatively, you can press the keyboard shortcut: CTRL + E, CTRL + E.

 

Execute code in Visual Studio 2015 Interactive Window (www.kunal-chowdhury.com)

 

Once you command Visual Studio 2015 Update 2 to execute the selected code in C# Interactive window, you will see that the code has been copied to the said window with proper code highlighting (just like Visual Studio IDE) and in the next line, it results the output.

 

For reference, check the following screenshot which will give you basic but clear understanding:

 

Visual Studio 2015 - C# Interactive Window Enhancements (www.kunal-chowdhury.com)

 

I hope that the post was clear and easy to understand. Don’t forget to checkout my other posts on Visual Studio 2015 Tips & Tricks, which you can find on the below URL: http://visual-studio-2015.kunal-chowdhury.com. Bookmark this page for future reference.

 

Do you know that, along with Visual Studio 2015 Update 2, Microsoft also released the vNext version of our favorite IDE? It’s named as “Visual Studio 15” and currently under preview release (under development). But you can still download it, try out the feature and provide your valuable feedback to Microsoft. You can download the Visual Studio vNext.15 version from the below URL: http://po.st/vs15-preview

 

Have a question? Or, a comment? Let's Discuss it below...

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.