For without init value : for « Language Basics « C# / C Sharp
- C# / C Sharp
- Language Basics
- for
For without init value

/*
Learning C#
by Jesse Liberty
Publisher: O'Reilly
ISBN: 0596003765
*/
using System;
public class ForWithoutTester
{
public static void Main()
{
int counter = 0;
// some work here
counter = 3;
// more work here
for ( ; counter<10; counter++)
{
Console.WriteLine(
"counter: {0} ", counter);
}
}
}
Related examples in the same category