views:

53

answers:

4

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?

+2  A: 

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.

Aren
thanks for the suggestion, I'll check that out
tbischel
It would be nice if it were a plug-in for visual studio...
tbischel
A: 

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...

Jon Skeet
A: 

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

Will
+1  A: 

One other you should check out is Snippet Compiler

orvado