Search code examples
.netread-eval-print-loop

Is there a command line interface or an interpreter for running .net code?


I need it, but don't want to reinvent hot water.

Question by example, syntax just as possible example :

.net> load myLibrary.dll
myLibrary.dll loaded

.net> Person p "John" "Doo" 32
Instance of myLibrary.Person created (p)

.net> print p.Age
32

So I'm looking for a commandline interface to access the public methods and properties of an assembly. (In this example the Ctor of Person(string,string,int) was invoked and after that the property Age was printed to the console.)

Although I would be happy with any solution to this,

  • I need the sourcefiles to, so I can adapt them... (I prefere c# very much)
  • I need it to be free and redistributable

Any ideas?

UPDATE : If I cannot find a good solution, i will program it myself, anyone interested can contact me at gmail, that is phelsen at.


Solution

  • F# has a command-line REPL (fsi.exe). And the code for F# is available.

    (See http://strangelights.com/fsharp/wiki/default.aspx/FSharpWiki/FSI.html for an old screenshot to get an idea.)