Introduction
As all books or materials showed that a .NET/C# application starts with a Main
method. But we can write multiple Main
methods in our project, then we can choose the correct one you wanted.
You may think that multiple Main
is useless, but when your project has different startup processes depend on different compile conditions or you have to change a lot of codes to start your application, it may be a good choice to write multiple Main
methods.