What is static constructor?
Interview question and answer by: Raja
| Posted on: 4/8/2008 | Category: C# Interview questions
| Views: 9634 |
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.
http://www.c-sharpcorner.com/UploadFile/cupadhyay/StaticConstructors11092005061428AM/StaticConstructors.aspx | Asked In:
| Alert Moderator
Found interesting? Add this to: