With The Help of these steps you can run your program through command prompt.
- Paste the code from the preceding procedure into any text editor, and then save the file as a text file. Name the file Hello.cs. C# source code files use the extension.cs.
- On the Start menu, expand Visual Studio Tools, and then choose the shortcut to open a Visual Studio Command Prompt window.
As an alternative, you can follow the instructions in How to: Set Environment Variables to enable command-line builds from a standard Command Prompt window. - In the Visual Studio Command Prompt window, navigate to the folder that contains your Hello.cs file.
- Enter the following command to compile Hello.cs.
csc Hello.csIf your program has no compilation errors, an executable file that is named Hello.exe is created. - In the Visual Studio Command Prompt window, enter the following command to run the program:
HelloNote: This information is taken from Microsoft site so if you want to know more then follow the link which is given below...
No comments:
Post a Comment