What is use of private constructor in C# ?

What is use of private constructor in C# ?

If a class contains only static members and isn’t intended to be instantiated, adding an empty private instance constructor will prevent instantiation.

Leave a Reply

Discover more from Abhyas

Subscribe now to keep reading and get access to the full archive.

Continue reading