+ 1
It's a special instance constructor, generally used in classes that contain static members only. If a class has one or more private constructors and no public constructors, other classes (except nested classes) cannot create instances of this class. For example: class NLog { // Private Constructor: private NLog() { } public static double e = Math.E; //2.71828... } The declaration of the empty constructor prevents the automatic generation of a default constructor. Note that if you do not use an access modifier with the constructor it will still be private by default. However, the private modifier is usually used explicitly to make it clear that the class cannot be instantiated. From microsoft.com
8th Jul 2016, 2:32 PM
Albert Gullbee