Sometimes it's handy to have access to your language to do quick things without starting Visual Studio and creating a new console app.
Is there something like Python's interactive mode or groovy shell, except for C#?
Sometimes it's handy to have access to your language to do quick things without starting Visual Studio and creating a new console app.
Is there something like Python's interactive mode or groovy shell, except for C#?
Have a look at CsharpRepl (part of the Mono project). Never used it myself, I hasten to add.
For LINQ stuff, you should also look at LINQPad.
Here is a Mono CsharpRepl which is what you are looking for.
This documents the features available in the C# interactive shell that is part of Mono's C# compiler. An interactive shell is usually referred to as a read eval print loop or repl. The C# interactive shell is built on top of the Mono.CSharp (http:/monodoc/N:Mono.CSharp) library, a library that provides a C# compiler service that can be used to evaluate expressions and statements on-the-fly.
Like others noted, Mono's CSharpRepl is probably the right answer. However, if you're not fixed to C#, then PowerShell is a pretty nice environment of playing around with .NET. I frequently use it to test regular expressions, format strings, etc. All the kinds of stuff you have ConsoleProject163 lying around for :)
In addition to the other good answers here (+1), there is also CSI and the immediate window in Visual Studio.
You can use this developed by Miguel De Icaza, is shipped with mono and have code completion