Why main() is static in C#?

It is automatically loaded by the CLR and initialised by the runtime when the class is first loaded. If it wasn’t static an instance of the class would first need to be created and initialised.

0 comments:

Post a Comment