---
title: "What is a sealed class in C# programming and why do we use this class in OPPs?"  
description: "What is a sealed class in C# programming and why do we use this class in OPPs?"  
author: "Ravi Vishwakarma"  
published: 2021-08-23  
updated: 2021-08-23  
canonical: https://www.mindstick.com/forum/156714/what-is-a-sealed-class-in-c-sharp-programming-and-why-do-we-use-this-class-in-opps  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# What is a sealed class in C# programming and why do we use this class in OPPs?

What is a [sealed class](https://www.mindstick.com/forum/33880/difference-between-abstract-class-and-sealed-class) in [c# programming](https://answers.mindstick.com/qa/93922/why-c-sharp-programmers-use-properties-technique-in-c-sharp-programming) and why do we use this class in OPPs?

## Replies

### Reply by Ashutosh Kumar Verma

In C# a sealed [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp) 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](https://www.mindstick.com/articles/12214/web-development-company-in-india-laid-on-the-foundation-of-concrete-java-programming) because it can not be inherited.


---

Original Source: https://www.mindstick.com/forum/156714/what-is-a-sealed-class-in-c-sharp-programming-and-why-do-we-use-this-class-in-opps

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
