Why 'static' keyword is used before Main()?
Interview question and answer by: Abhisek
| Posted on: 2/25/2010 | Category: C# Interview questions
| Views: 3085 |
Program execution starts from Main(). S it should be called before the creation of any object. By using static the Main() can now be called directly through the class name and there is no need to create the object to call it. So Main() is declared as static.
| Alert Moderator
Found interesting? Add this to: