What is static constructor?

 Posted by Raja on 4/8/2008 | Category: C# Interview questions | Views: 27838

Static constructor is used to initialize static data members as soon as the class is referenced first time, whereas an instance constructor is used to create an instance of that class with keyword. A static constructor does not take access modifiers or have parameters and can't access any non-static data member of a class.

Source: http://www.c-sharpcorner.com/UploadFile/cupadhyay/StaticConstructors11092005061428AM/StaticConstructors.aspx | Asked In: Microsoft | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Raja