Do A Program Have Multiple Main Method
Basically main method is the entry point into application. We can define multiple Main methods but we have to select a single main method when running our app. Need to specify which to use as the entry point for the application by our compiler.
When we run this code we will get compilation error. To resolve the error we need to specify which Main method we want to execute. To specify the entry point we can follow the following stapes:
- Go to project properties in solution explorer or press ctrl + alt + L.
- Go to application tab
- Select class with method which we want to execute