- Write a static Main method in any editor, must be static and named Main method, and the main method is located in the class file named Yang.cs (the name casually named), 1.
Figure-1
- Open your vs2013 developer command prompt,-2.
Figure-2
- Note that the first line in Figure 2 is a path that puts a class file named Yang.cs into this path,-3.
Figure-3
- Enter CSC Yang.cs in the vs2013 Developer command Prompt and press ENTER,-4.
Figure-4
- Then look at what happened under the path (a yang.exe executable was generated), 5.
Figure-5
- Then continue typing in the vs2013 developer command prompt: Yang, you can execute the main method you wrote,-6.
Figure-6
- Because the main method has the ability to receive input, you can continue typing,-7.
Figure-7
- If your method is not static or the method name is not main, there will be such a mistake,-8 and figure-9.
Figure-8
Figure-9
Note: I am a rookie, if there is a mistake, please correct me, thank you!!!
How to use the vs2013 Developer Command Prompt tool to execute a method (a simple demo)