Reputation: 24875
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?
Upvotes: 2
Views: 306
Reputation: 5319
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:
Upvotes: 5