我安装了Roslyn。现在,如果我知道在哪里看在Visual Studio中,我可以打开“C#交互窗口”,并运行代码:C#交互式窗口可以与我的代码交互吗?
> 5 + 3
8
这就是可爱。现在我怎样才能互动我的代码 -my classes?假设我有一个项目打开。
> 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?)
Roslyn不是交互式窗口。它是.NET编译器API。你确定不会错过这些东西吗? – Tigran
这是Roslyn附带的一个功能http://blogs.msdn.com/b/csharpfaq/archive/2012/01/30/roslyn-ctp-introduces-interactive-code-for-c.aspx –
我总是使用标准即时窗口 - 适用于您自己的类型。 – Polyfun