/main:class
where:
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 a .exe.
Compile t2.cs
and t3.cs
, specifying that the Main method will be found in Test2
:
csc t2.sc t3.sc /main:Test2