views:

61

answers:

3

Hi,

Does anyone know if there exist some kind of immediate-window-like command prompt, either to run from inside VS or as a separate program. It would be nice to have something like that to try and evaluate static methods etc without having to debug the solution (for example, evaluate Path methods)

A: 

Do you mean the Direct-Window? You can directly evaluate Methods and Functions in there (though, he does have to compile the assemblies before that).

Alternatively you can use C# Script.

Bobby
Where do I find the Direct-Window?
kaze
You should find it in the menu, Debug -> Window -> Direct.
Bobby
A: 

I use Snippet Compiler a lot; a somewhat-lightweight editor that gives you a runnable console app that you can test expressions in. Very useful for trying out stack overflow answers before posting them =)

David Hedlund
A: 

You can use PowerShell (v2) for this:

PS> Add-Type -Path .\my_assembly.dll
PS> [MyAssembly.MyClass]::SomeStaticMethod(...)
Joey