“Execute in Interactive”– Send to C# Interactive Window – Visual Studio 2015

By | March 5, 2016

“Execute in Interactive” feature is great addition with the new Visual Studio 2015 Update.  Previously I shared several posts on C# Interactive Window , discussed about how to work with itHow to execute scripts using interactive Window ? . Recently I shared another quick tip  on Calling current project methods from C# Interactive Window in Visual Studio 2015 ? which talks about interacting with current projects. While this works well, you need to load the assembly or the executive file first before you execute any code inside the Interactive Window.

Well, this is now more simpler and you can interact with your current project code easily by sending them to interactive Window. The recent updates of Visual Studio 2015 now support “Executive in Interactive” by which you can send the code directly to  Interactive Window.

  • Select the Line or Block of Code which you want to send in Interactive Windows
  • Right Click, and from the Context menu select “Execute in Interactive’’”


This will send the code directly to Interactive Command Windows.


You can now start using names inside interactive Windows.

Here is the interesting facts, if your code has executable, for an example writing something to Console, the Interactive Window will execute it automatically.

For an example you select the below code block and then choose “Execute in Interactive”



This will not only push the code to Interactive Window, it will also execute the same as given in below snapshot.


All in all, this is a great addition and can help developer quickly push some code to interactive window and test them out.


Hope this helps

3 thoughts on ““Execute in Interactive”– Send to C# Interactive Window – Visual Studio 2015

  1. Pingback: Dew Drop – March 7, 2016 (#2202) | Morning Dew

  2. Pingback: Visual Studio – Developer Top Ten for Mar 15th, 2016 - Dmitry Lyalin

  3. Ruwani

    Hi, c could you please tell me is there a configuration to enable ‘Execute in Interactive’ option. Is it come with specific edition. I am using VS Professional 2015 v 14.0.24720.00 Update1.

Comments are closed.