[Previous] [Contents] [Next]

Iteration Statements


In C#, the while, do/while, for,and foreach statements enable you to perform controlled iteration, or looping. In each case, a specified simple or compound statement is executed until a Booleanexpression resolves to true, except for the case of the foreach statement, which is used to iterate through a list of objects.

[Previous] [Contents] [Next]