There is an error in the do... while loop above. There is a semi-colon missing but if it is added the block will execute once and then go into an infinite loop. Below is the correct code.
Sorry 'bout that.Code:do{ Console.WriteLine("myVar is now {0}", myVar); myVar++; } while(myVar < 100);




Reply With Quote