Mega Code Archive

 
Categories / C# / Language Basics
 

Do While Tester

/* Learning C#  by Jesse Liberty Publisher: O'Reilly  ISBN: 0596003765 */  using System;  public class DoWhileTester  {      public static void Main()      {          int counterVariable = 11;          // display the message and then test that the value is          // less than 10          do          {              Console.WriteLine("counterVariable: {0}",counterVariable);              counterVariable++;          } while (counterVariable < 10);      }  }