Friday, March 15, 2019

Private Constructor In C#

A private constructor is a special instance constructor. It is 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.

source https://www.c-sharpcorner.com/Blogs/private-constructor-in-c-sharp

No comments:

Post a Comment