Why is the main method entry point in most C# programs static?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In order to call an instance method you need an instance of an object. This means in order to start your program the CLR would need to create an instance of say
Programin order to call the methodMain. Hence the constructor ofProgramwould run beforeMainwhich defeats the purpose of having a main altogether.