In C# and C++/CLI the keyword sealed
(or NotInheritable
in VB) is used to protect a class from any inheritance chance (the class will be non-inheritable). I know that one feature of object-oriented programming is inheritance and I feel that the use of sealed
goes against this feature, it stops inheritance.
Is there an example that shows the benefit of sealed
and when it is important to use it?