/main (Specify Location of Main Method)
- The type that contains the Main method.
If your compilation includes more than one type with a Main method, you can specify which type contains the Main method that you want to use as the entry point into the program.
This option is for use when compiling an .exe file.
To set this compiler option in the Visual Studio development environment
- Open the project's Property Pages dialog box. For details, see Setting Visual C# Project Properties.
- Click the Common Properties folder.
- Click the General property page.
- Modify the Startup Object property.
To set this compiler option programmatically
See StartupObject Property.
t3.cs, specifying that the Main method will be found in
csc t2.cs t3.cs /main:Test2