Is there a command line interface or interpreter to run .net code?

I need it, but I do not want to invent hot water.

Question by example, as syntactical example as possible:

.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 command line interface to access the public methods and properties of the assembly. (In this example, Ctor of Person (string, string, int) was called, after which the Age property was printed to the console.)

Although I would be pleased with any solution for this,

  • I need the source files, so I can adapt them ... (I really love C #)
  • I need it to be free and redistributable

Any ideas?

UPDATE: if I cannot find a suitable solution, I will program it myself, anyone can contact me in gmail, that is, in phelsen.

+3
5
+7

You might want to study Powershell , although to my knowledge there is no source. The syntax is not exactly C #, but it is pretty easy to pick up.

+6
source

IronPython also has a REPL.

+3
source

Have you tried PowerShell (previously code called Monad)? This is a .NET-based CLI with full access to assemblies, albeit with a different model than the assembly loading procedure you specified.

+2
source

Source: https://habr.com/ru/post/1707139/


All Articles