# for Loop

A loop that keeps its setup, condition, and update together.

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

**for Loop** — A loop that keeps its setup, condition, and update together.

```csharp
class Schedule
{
    void MarkDays(bool[] scheduled)
    {
        for (int day = 0; day < scheduled.Length; day++)
        {
            scheduled[day] = true;
        }
    }
}
```

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

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

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