While Iteration Statements - CSharp Language Basics

CSharp examples for Language Basics:while

Description

While Iteration Statements

Demo Code

using System;//from   w ww  . j av a 2  s  . c  o  m
using static System.Console;
class Program
{
   static void Main(string[] args)
   {
      int x = 0;
      while (x < 10)
      {
         WriteLine(x);
         x++;
      }
   }
}

Result


Related Tutorials