Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a good Read, Eval, Print, Loop implementation for C#? [duplicate]

Some programming language implementations provide a Read, Evaluate, Print Loop interactive shell to allow the programmer to evaluate expressions and program fragments, and to program in an incremental, interactive manner.

What implementations of a C# REPL have you used, and liked? It would be nice to have one that could integrate with Visual Studio as well.

I have found, but not tried, the Mono C# REPL and Don Box's C# REPL

like image 201
grrussel Avatar asked Jun 24 '09 12:06

grrussel


2 Answers

Mono comes with a REPL tool called "csharp". I just tried it on Mac OS X and it works like magic. The only feature it currently lacks is Intellisense, promised to appear in Mono 2.6

like image 78
Stop Putin Stop War Avatar answered Sep 28 '22 05:09

Stop Putin Stop War


Visual Studio 2008 includes REPL-like capabilities, though I wouldn't necessarily call them "good". I think they have the advantage of being included and always available--which can be handy when trying to do work at a workstation other than your own.

In Visual Studio, you can instantiate and invoke methods of objects using the Object Test Bench. You can also write interactive C# code (with many limits) using the Immediate Window (Debug->View->Immediate Window). Immediate Window can be used outside of a debugging session.

like image 42
James Schek Avatar answered Sep 28 '22 06:09

James Schek