I\'m working on some C# code that has loop syntax that I\'ve never seen before:
for (;;)
{
//Do some stuff
}
What does a for loop without
This type of for loop is an infinite loop. It is the equivalent of while(true){stuff to be executed...}. It keeps on going until it hits a break, return, or a goto to a label outside the loop.
A for loop has three parts, an initialization, a condition, and a block to be executed after the loop. Without a condition to be tested against, the loop will just keep on going.