# Inheritance

*noun*

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

Making a new class from an existing one, so it gets everything the parent has and changes only what differs.

## What is **Inheritance**?

**Inheritance** lets one class build on another. The new class gets all the data and methods of the existing class and can add or change some. A `Cat` class can inherit from `Animal` and add a `Purr` method.

```csharp
public class Animal
{
    public string Name { get; set; }
    public void Eat() => Console.WriteLine($"{Name} is eating");
}

public class Cat : Animal
{
    public void Purr() => Console.WriteLine("Purrr");
}
```

## In a sentence

- “Through **inheritance**, the e-bike got the bike's bell without a line of its own.”

Level: Apprentice · [More OOP terms at this level](https://www.ask-codey.com/glossary?category=oop&level=2)

Updated: November 9, 2026

## In other subjects

- [Inheritance in C#](https://www.ask-codey.com/glossary/inheritance-c-sharp)
- [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 Python](https://www.ask-codey.com/glossary/inheritance)

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