When using Visual Studio 2015:
You can open the Interactive window by clicking on the link Views> Other Windows OS> C # Interactive ,
Then, simply right-click the project and run Initialize Interactive Project from the context menu.
For older versions:
To use the C # interactive window with code, make sure you compile your code first, and then add the link to the resulting assembly using the #r as follows:

You can also use Immediate Window to interact with your code, for example:

sloth Jun 21 '12 at 10:00 2012-06-21 10:00
source share