Colonel Panic Colonel Panic - 2 years ago 118
C# Question

Can the C# interactive window interact with my code?

I installed Roslyn. Now, if I know where to look in Visual Studio, I can open the 'C# interactive window', and run code:

> 5 + 3

That's cute. Now how can I interact my code—my classes? Assume I have a project open.

> new Cog()
(1,5): error CS0246: The type or namespace name 'Cog' could not be found (are you missing a using directive or an assembly reference?)

Answer Source

You can use classes from your own project.
Just right click on your solution and select "Reset Interactive from Project".

If you need more information, here is the source:
Using the C# Interactive Window that comes with Roslyn – Part 2

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download