How to do I specify which main to use in a project

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hello!

I have a project where I have several files with a main method.
I just want to know how I specify which one to use.

//Tony
 
I have a project where I have several files with a main method.
I just want to know how I specify which one to use.

In Visual Studio, you go to project properties, "Application" tab, and
choose the class you want from the "Startup object" dropdown.

When compiling .cs files from command line, you use the /
main:<classname> switch.
 
Back
Top