An empty expression may be useful. Check out this interesting example of an infinite loop:
for (;;) {
Run the following version as proof, but with a break from infinity:
int count = 0; for (;;) { count++; if (count > 10) break; } Console.WriteLine("Done");
But if you really want to make an infinite loop, use while (true) {} instead of for (;;) {} . While (true) less accurate, it is easier to read and readily connects the intention of the cycle endlessly.
source share