Sealed Class in C#
What is the main purpose of Sealed Class?
Sealed classes are used to restrict the inheritance feature of object oriented programming. Once a class is defined as a sealed class, this class cannot be inherited.
Why Sealed Classes?
We just saw how to create and use a sealed class in C#. The main purpose of a sealed class is to take away the inheritance feature from the class users so they cannot derive a class from it. One of the best usage of sealed classes is when you have a class with static members.
reference : c-sharpcorner.com\Mahes Chand
Last updated
Was this helpful?