# Looping in C#

Looping in C#: While Loop, Do-While Loop, For Loop, Foreach Loop.

Updated: November 3, 2026

1. [While Loop](https://www.ask-codey.com/lessons/looping-in-csharp-while-loop) (Novice): Repeat a block of code for as long as a condition stays true with C#'s while loop, and make sure the loop can end.
2. [Do-While Loop](https://www.ask-codey.com/lessons/looping-in-csharp-do-while-loop) (Apprentice): Run a block of code at least once, then repeat it while a condition is true, with C#'s do-while loop.
3. [For Loop](https://www.ask-codey.com/lessons/looping-in-csharp-for-loop) (Novice): Count through a range of numbers, or through an array's indexes forward, backward or in steps, with C#'s for loop.
4. [Foreach Loop](https://www.ask-codey.com/lessons/looping-in-csharp-foreach-loop) (Apprentice): Visit every element of an array without an index using C#'s foreach loop, and leave a loop early with break or skip ahead with continue.

Source: https://www.ask-codey.com/courses/csharp-full-stack-bootcamp/topics/looping-in-csharp
