a do…while loop


   

/*
Mastering Visual C# .NET
by Jason Price, Mike Gunderloy

Publisher: Sybex;
ISBN: 0782129110
*/
/*
  Example4_10.cs illustrates the use of
  a do...while loop
*/

public class Example4_10
{

  public static void Main()
  {

    int counter = 1;
    do
    {
      System.Console.WriteLine("counter = " + counter);
      counter--;
    }
    while (counter > 1);

  }

}