# Inheritance

*noun*

say it: **“in-HAIR-ih-tuns”** **/ɪnˈhɛrɪtəns/**

Making a new class from an existing one, so it gets the existing class's members and adds its own.

## What is **Inheritance** in C#?

**Inheritance** — Creating a class that receives accessible members from another class.

```csharp
class Alert
{
    public virtual string Text()
    {
        return "Alert";
    }
}

class EmailAlert : Alert
{
    public override string Text()
    {
        return "Email";
    }
}
```

## In a sentence

- “Through **inheritance**, Ebook gets Title and Price from Book.”

Level: Journeyman · [More C# terms at this level](https://www.ask-codey.com/glossary?category=c-sharp&level=3)

Updated: November 9, 2026

## In other subjects

- [Inheritance in CSS](https://www.ask-codey.com/glossary/inheritance-css)
- [Inheritance in Java](https://www.ask-codey.com/glossary/inheritance-java)
- [Inheritance in JavaScript](https://www.ask-codey.com/glossary/inheritance-javascript)
- [Inheritance in OOP](https://www.ask-codey.com/glossary/inheritance-oop)
- [Inheritance in Python](https://www.ask-codey.com/glossary/inheritance)

Source: https://www.ask-codey.com/glossary/inheritance-c-sharp
