There are lots many times we need to play with C# Code and at that time, C# interactive window might come handy. Those who don’t know what is C# interactive windows, This is a REPL that allows you to execute the C# code in the separate window. You can enable that window via Views-> Other Windows –> C# Interactive.
Once you click on it will open a window where you can write code and execute it. It will act as the play ground for your C# code.
Execute in Interactive with Visual Studio 2015 Update 2:
Earlier, When you need to use existing code with interactive window, you need manually copy and paste the code. Now with Visual Studio 2015 update 2, you have one menu available “Execute in Interactive”. You can right click your existing code and click on “Execute in Interactive”. It will load your code in C# interactive window.
Once you click it this code will be available to C# interactive window. Even you have a short cut for this also. Ctrl + E, Ctrl + E.
So it’s very useful. Hope you like it. Stay tuned for more!.
转载本站任何文章请注明：转载至神刀安全网，谢谢神刀安全网 » Execute in interactive with visual studio 2015 update 2