# Nested Loop

A loop placed inside another loop.

## What is **Nested Loop** in C#?

**Nested Loop** — A loop placed inside another loop.

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

            return number;
        }

        return -1;
    }
}
```

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

Updated: September 27, 2026

## In other subjects

- [Nested Loop in Java](https://www.ask-codey.com/glossary/nested-loop-java)
- [Nested Loop in JavaScript](https://www.ask-codey.com/glossary/nested-loop-javascript)

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