# break

*noun*

say it: **“BRAYK”** **/breɪk/**

A statement that leaves the nearest loop or switch straight away.

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

**break** — A statement that immediately exits the nearest loop or switch.

```csharp
class NumberFinder
{
    int FirstOdd(int[] numbers)
    {
        foreach (int number in numbers)
        {
            if (number % 2 == 0)
            {
                continue;
            }

            return number;
        }

        return -1;
    }
}
```

## In a sentence

- “The loop uses **break** as soon as it finds the book we're looking for.”

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

- [break in Java](https://www.ask-codey.com/glossary/break-java)
- [break in JavaScript](https://www.ask-codey.com/glossary/break-javascript)
- [break in PowerShell](https://www.ask-codey.com/glossary/break-powershell)
- [break in Python](https://www.ask-codey.com/glossary/break)
- [break in Unix](https://www.ask-codey.com/glossary/break-unix)

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