Mega Code Archive

 
Categories / C# / Language Basics
 

Parts of the for can be empty

/* C#: The Complete Reference  by Herbert Schildt  Publisher: Osborne/McGraw-Hill (March 8, 2002) ISBN: 0072134852 */ // Parts of the for can be empty.    using System;    public class Empty {      public static void Main() {      int i;        for(i = 0; i < 10; ) {        Console.WriteLine("Pass #" + i);        i++; // increment loop control var      }    }    }