Using Command Prompt to Compile C# Program:
- Write a C# Program
- Copy it on Notepad as given Picture
- Save it as a .cs file as given in picture, I am saving it on Desktop.
- Go to to Visual Studio Command Prompt.
- Write cd.. and press enter to go one directory back, and keep doing it until you reach C:/ Drive
- Now cd (directory name inside C:/) to go there for example "cd Users".
- I went to Desktop as i stored .cs file on desktop
- now write "csc faisal.cs" on command prompt to compile your file.
- .exe file is made on your desktop, Run and Enjoy