C# Console/CLI Interpreter?

后端 未结 17 1978
眼角桃花
眼角桃花 2020-12-24 07:57

I wonder if there is something like a standalone Version of Visual Studios \"Immediate Window\"? Sometimes I just want to test some simple stuff, like \"DateTime.Parse(\"bla

17条回答
  •  执念已碎
    2020-12-24 08:10

    If you happen to know and like Python, then IronPython may be a good alternative. It comes with a (Python) REPL console (ipy.exe) where you can import and use all of the .Net types.

    I find it useful for testing out little things, exactly like DateTime.Parse("Blah").

    Note that it can't actually execute C# code, but if all you want is access to .Net, then it's perfect. Also, if you install the IronPython Tools for VS, you can start a REPL session right in VS using a single keyboard shortcut (Alt+I) and leave it running in a docked window for when you need it.

提交回复
热议问题