Changes

Jump to: navigation, search

C Sharp Looping - The for Statement

2 bytes removed, 15:06, 7 July 2008
Creating an Infinite for Loop
== Creating an Infinite for Loop ==
A for loop which will execute an infinite number of times may be constructed using ''for (;;;)'' syntax. For example, the following code sample will output ''Hello from C#'' until the program is manually terminated by the user (or the computer is turned off or rebooted):
<pre>
for (;;;)
{
System.Console.WriteLine ("Hello from C#");

Navigation menu