sealed class in C# with Example

Shahzad Aslam
3 min readApr 27, 2024

When you have class as base class and you want that any other derived class can not inherit this base class then we declared the base class as sealed class. The sealed keyword also can be used with method, property or event in the derived class to prevent further overriding. This is often done to protect the integrity of a class or to prevent unintentional modifications to its behavior.

sealed class in c# with example

Here’s how you can…

--

--

Shahzad Aslam

Welcome to c-sharptutorial.com. I am Shahzad Aslam. I am the founder of c-sharptutorial.com. I'm currently living near Islamabad, Pakistan.