The major goal of a sealed class in C# is removing the inheritance feature from it .
as a result developers will not be able to derive other class from it.
Sealed classes may be a good choice if you’re developing a class library and wish to prevent developers from deriving your classes.
When you place “sealed” keyword before the class declaration you prevents other classes from inheriting from it
Syntaxt:
Example of sealed class :
Sealed methods
Sealed methods cannot be overridden. However, direct child class can only override the method, class that inherited the child class that cannot override the sealed methods. Basically in multilevel inheritance sealed keyword prevent the methods from multiple overridden. If you want to make a method as sealed then you have to put sealed keyword in child class before override and make it virtual in base class.
Syntax:
Example