Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Console? [closed]

Does anyone know if there is a c# Console app, similar to the Python or Ruby console? I know the whole "Compiled versus Interpreted" difference, but with C#'s reflection power I think it could be done.

UPDATE Well, it only took about 200 lines, but I wrote a simple one...It works a lot like osql. You enter commands and then run them with go.

SharpConsole http://www.gfilter.net/junk/sharpconsole.jpg

If anyone wants it, let me know.

like image 516
FlySwat Avatar asked Sep 06 '08 15:09

FlySwat


3 Answers

Given your mention of "C#'s reflection power", I am unsure whether you're looking for an interactive C# console for small code snippets of your own (à la Ruby's irb), or a means of interacting with an existing, compiled application currently running as a process.

In the former case:

  • Windows PowerShell might be your friend
  • Another candidate would be the C# shell
  • Finally, CSI, a Simple C# Interpreter
like image 191
Sören Kuklau Avatar answered Nov 07 '22 08:11

Sören Kuklau


Found this on reddit: http://tirania.org/blog/archive/2008/Sep-08.html

Quote from the site:

The idea was simple: create an interactive C# shell by altering the compiler to generate and execute code dynamically as opposed to merely generating static code.

like image 22
Daren Thomas Avatar answered Nov 07 '22 08:11

Daren Thomas


If you don't have to use the console, and just want a place to test some ad hoc C# snippets, then LinqPad is a good option. I find it very cool/easy to use.

like image 8
AR. Avatar answered Nov 07 '22 08:11

AR.