# const

*noun*

say it: **“KONST”** **/kɒnst/**

A C# keyword for a value that is fixed when you write the code and can never change.

## What does **const** do in C#?

**const** — A modifier for a compile-time constant whose value is fixed in its declaration.

```csharp
class Cart
{
    const int MaxItems = 100;
}
```

## In a sentence

- “I declared the tax rate as a **const**, so nobody can change it by mistake.”

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

Updated: November 9, 2026

## In other subjects

- [const in JavaScript](https://www.ask-codey.com/glossary/const-javascript)

Source: https://www.ask-codey.com/glossary/const
