Qus:    Why we have “Main()” method as static method?
Nov 25, 2020 14:59 2 Answers Views: 1399 SAI

When we run the application the CLR will invoke Main(). If the Main() is a instance method it requires object. To succeed this, Main() method is defined as static method.

Prev Next
Answers (2)
KRISHNA SWAROOP Nov 26, 2020 07:59
Answer:   When we run the application the CLR will invoke Main(). If the Main() is a instance method it requires object. To succeed this, Main() method is defined as static method.

PARTH Nov 26, 2020 08:28
Answer:   A main method is static since it is available to run when the C# program starts. It is the entry point of the program and runs without even creating an instance of the class.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect