# protected

*noun*

say it: **“pruh-TEK-tid”** **/prəˈtɛktɪd/**

An access modifier that lets a member be used in its own class and in classes derived from it.

## What is **protected** in C#?

**protected** — An access modifier that lets a member be used inside its own class and in classes that inherit from
it, but not from anywhere else.

```csharp
class Account
{
    protected decimal balance = 20m;
}

class SavingsAccount : Account
{
    public void AddInterest()
    {
        balance += balance * 0.02m;   // allowed: SavingsAccount inherits from Account
    }
}
```

## In a sentence

- “I made the stock count **protected**, so Ebook can read it but other classes can't.”

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

- [protected in Java](https://www.ask-codey.com/glossary/protected)
- [Protected in OOP](https://www.ask-codey.com/glossary/protected-oop)

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