A static constructor is one that can accept no arguments and is called only once during the entire application's lifecycle. It is invoked the first time when any static member of the class to which it belongs, is referenced. A private constructor prevents instantiation and subclassing of the class and a public constructor is called when the class is instantiated. It should be noted that we can have only one private or static constructor for a class. A private constructor of a class can however be accessed from other public constructors of the class through constructor chaining.

Please refer to my article for more details on this topic at the following link:--

http://aspalliance.com/770_Constructors_in_C

Sponsor