# Random Class

A class that produces pseudorandom values of several numeric types.

## What is **Random Class** in C#?

**Random Class** — A class that produces pseudorandom values of several numeric types.

```csharp
class Dice
{
    Random random = new();

    int Roll()
    {
        return random.Next(1, 7);
    }
}
```

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

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/random-class
