# Assignment

Storing a value in a variable with the = operator.

## What is **Assignment** in C#?

**Assignment** — Storing a value in a variable with the = operator.

```csharp
class Game
{
    void UpdateScore()
    {
        int score = 10;
        score = score + 5;
    }
}
```

Level: Novice · [More C# terms at this level](https://www.ask-codey.com/glossary/subjects/c-sharp/novice)

Updated: September 27, 2026

## In other subjects

- [Assignment in Java](https://www.ask-codey.com/glossary/assignment-java)
- [Assignment in JavaScript](https://www.ask-codey.com/glossary/assignment-javascript)

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