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
> 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?)
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