C# Basics

C# Iteration Statements

C# iteration statement (loop) is a block of code that will repeat itself over and over again until a given condition is true or some terminating condition is reached. The condition is anything that you want the program to evaluate before each and every time it loops. Whenever the condition is true, the program knows to repeat. Once that condition is false, then it’s time to stop repeating.

There are four looping structures in C# that enable you to execute a block of code multiple times until a certain condition is met.