How to quickly check a piece of code in Visual Studio (2008)?

Based on Python, where I can just run iPython to test a small piece of code I'm looking for in Visual Studio. Creating projects and classes just to test a small idea just seems so cumbersome.

+7
c # visual-studio
source share
5 answers
+6
source share

You might want to check out LINQPad . Sure, it works great for LINQ, but it works great for other snippets too.

Personally, I just use a simple text editor and Test.cs in the test directory (c: \ Users \ Jon \ Test) and compile from the command line :)

+6
source share

I save the Sandbox project with a console application to do such things.

+5
source share

See Instant Window in Visual Studio.

The Immediate window is used during development to debug and evaluate expressions, execute statements, print variable values, etc. It allows you to enter expressions that will be evaluated or executed by the development language during debugging.

To display the Immediate window, open the project for editing, then select Windows from the Debug menu and select Immediate.

+3
source share

I use powershell to test .net concepts. Because it allows a more iterative learning process. If you need, however, to test the structure of the program or complex concepts, designing easy-to-test interfaces that are easy to test as the volume moves beyond the 5-minute test.

0
source share

All Articles