简体   繁体   中英

C# interpreter add-in for visual studio

I come from a lisp background where I could type in snippets to the command line while coding, to make sure I get a small chunk of code correct the first time. Its great for testing string formatting, simple math calls, etc without having to recompile a whole project to test small changes.

Is there a feature or add-in in visual studio 2010 to get this type of functionality, say like a watch window that runs when you aren't actually executing the program?

You can abuse the Intermediate window to evaluate things (in debug mode). However, i'd suggest LinqPad it has basic code execution on the fly.

As well as LinqPad mentioned by Aren, you might want to look at Mono's CsharpRepl .

I don't know if either of these have Visual Studio add-ins available, but it's an interesting thought...

I usually use LinqPad, but have you tried the immediate window? Personally, this kind of thing is great for creating a unit test.

你应该检查的另一个是Snippet Compiler

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM