do -- while loop body will execute loop body at least once.
Irrespective of the condition whether true or false
do while loop body executes at least once.
sytax
do
{
// loop body statements
}(condition);
first execution starts from do
then body of the loop will be executed
next after finishing the body execution it will encounter a closing bace where condition execution starts.
then upon the condition is true it will execute the body other wise it will skip the body
A do...while loop is similar to a while loop, except that a do...while loop is guaranteed to execute at least one time.
Syntax:
The syntax of a do...while loop in C# is:
do
{
statement(s);
}while( condition );