The sealed
means that a class cannot be inherited. Declaring private constructors means that instances of the class cannot be created.
This is not the same thing. You can have a base class with a private constructor, but still inherit from this base class, define some public constructors, and efficiently create this base class.
Remember that constructors are not inherited (therefore, a derived class will not have all private constructors just because the base class does this), and these derived classes always invoke base class constructors. Labeling a sealed
class prevents someone from trivially working around your carefully designed singleton class, because it keeps someone from inheriting from the class.
source share