Creating a class with a private constructor is a common template for implementing a Singleton object.
Singleton will usually create an instance of itself and allow access to it through the static "Instance" property, which means that there is only one instance of the class.
The advantage of using Singleton over a purely static class is that you can use interfaces and different implementation classes in singleton. Your "Singleton" can provide an interface for a set of methods, and you can choose which implementation class should be created under the covers. If you were to use a purely static class, it would be difficult to replace a completely different implementation without affecting other code.
The main disadvantage of Singleton is that it is difficult to replace the implementation class with it, since it is controlled by Singleton's private methods, but there are ways around this.
source share