You are on page 1of 7

Object-Oriented Programming

Loops
• Loops are used to execute one or more statements
multiple times until a specified condition is fulfilled.
There are many loops in C# such as for loop, while
loop, do while loop etc.
For Loop
• The for loop executes one or more statements
multiple times as long as the loop condition is
satisfied. If the loop condition is true, the body of the
for loop is executed. Otherwise, the control flow
jumps to the next statement after the for loop.
While Loop
• The while loop loops through a block of code as long
as a specified condition is True:
DoWhile Loop
• The do/while loop is a variant of the while loop. This
loop will execute the code block once, before
checking if the condition is true, then it will repeat
the loop as long as the condition is true.
Thanks for listening
Alubijid | Balubal | Cagayan de Oro | Claveria | Jasaan | Oroquieta | Panaon | Villanueva

Home of the Trailblazers

You might also like