Answer: Similar to '
switch and
case' statements,
do executes the entire statement block repeatedly until it meets a false evaluation which is stated by
while.
Example,
int x = 3;
do
{
Console.WriteLine(a); // This will print from 3 to 8 (because of while)
a++;
}
while (a < 9);
Asked In: Spotted While Learning |
Alert Moderator