In C# a sealed class is a class which is not allow to inherits itself in derived class. There are no derived class can create of sealed class. Declaring a sealed class must use
sealed modifier. If we create derived of this class then c# compiler generate error.
Sealed class is used to restrict or remove the feature of inheritance in object oriented programming because it can not be inherited.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
In C# a sealed class is a class which is not allow to inherits itself in derived class. There are no derived class can create of sealed class. Declaring a sealed class must use sealed modifier. If we create derived of this class then c# compiler generate error.
Sealed class is used to restrict or remove the feature of inheritance in object oriented programming because it can not be inherited.