If you’re anything like me, while searching around the Internet for help and tutorials on coding you’ve probably come across some interesting code you’d like to run but didn’t want to make a full VS project to run the code.
Well doing some research into C# arrays, I came into the same problem on the page below.
http://msdn.microsoft.com/en-us/library/aa288453(v=vs.71).aspx
1) Copy and paste your code into your favorite text editor.
2) Save the file to an easy to access folder in your file system.
3) Next open up either Visual Studio Command Prompt or if you have VS 2012 installed Developer Command Prompt for VS2012.
4) Navigate to the folder where you saved the .cs file.
5) Run the command below, replacing [insertfilenamehere] with the filename of your .cs file.
csc [insertfilenamehere].cs
6) After running the command, the folder should contain a new exe of your file. You can run it by running the command below.
start [insertfilenamehere].exe
7) Enjoy your results…

Login