This documentation is archived and is not being maintained.
do...while Statement
Visual Studio 2008
Updated: July 2009
Executes a statement block once, and then repeats execution of the loop until a conditional expression evaluates to false.
do statement while (expression)
Unlike the while statement, a do...while loop is executed one time before the conditional expression is evaluated.
On any line in a do…while block, you can use the break statement to cause the program flow to exit the loop, or you can use the continue statement to go directly to the while expression.
Show: