Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: A class can have many mains, how does this work?
Answer: Only one of them is run, that is the one marked (public) static, e.g:
public static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
}
private void Main(string[] args, int i)
{
}
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook