Python allows the following: once I open cmd I can start python and then run python commands which return results directly in cmd. For example, I type print word and cmd returns word. Is there a similar thing for C# or the only way to execute C# code is to write it in a file and then compile it?
Python allows the following: once I open cmd I can start python and then
Share
Use PowerShell.
This will allow you to access the objects in the .Net Framework as well the objects in the operating system.
Check this simple example:
Or you can check this advanced example:
http://blogs.technet.com/b/stefan_gossner/archive/2010/05/07/using-csharp-c-code-in-powershell-scripts.aspx