Why is the main method entry point in most C# programs static?

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 Program in order to call the method Main. Hence the constructor of Program would run before Main which defeats the purpose of having a main altogether.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)