views:

147

answers:

4

Often times, I start a new instance of Visual Studio, just to create a console application that has some output and/or input. It's a temporary sandbox I use to test a method or something else and close a few minutes later.

Can you think of any tools to replace this?

I use to have an application that had two text fields: one on top to take C# code, and one on the bottom, to act as an stdout. But I can't remember the name.

+1  A: 

You can use the command-line C# compiler csc.

It's as simple as writing a makefile, really.

Anon.
+1, Makes perfect sense for very small test applications and would work well with Notepad++ with syntax set to C# (http://notepad-plus.sourceforge.net/uk/site.htm)
Jamie Keeling
+4  A: 

Take a look at LINQPad. It's light-weight and has lots of features. Great for short snippets. Snippet Compiler is another good one. It used to be my main choice before LINQPad. Its author doesn't seem to be actively updating it lately.

These are the two main ones from my suggestions listed here: Are there any alternatives to FastSharp?

EDIT: In addition, the Mono project has a C# REPL.

Ahmad Mageed
This. From the site: "And LINQPad is more than just a LINQ tool: it's a highly ergonomic code snippet IDE that instantly executes any C#/VB expression, statement block or program"
Chris
Per your linked answer, I'd add a mention of Snippet Compiler (http://www.sliver.com/dotnet/SnippetCompiler/).
itowlson
@itowlson done :)
Ahmad Mageed
A: 

Unit tests and TDD. It's the closest thing to REPL you can get in a static language.

kyoryu
A: 

The Visual Studio debugger has a window that allows you to enter commands at runtime, and it also allows you to enter watches - which are more static but also accomplish the same task. Anyway, both could be considered a "poor man's" REPL.

Justin Ethier