For example when we write the console application, we may have some menu structure and it will keep on display to allow the users choose any one option.
1. Employee Creation
2. Employee List
3. Search
4. Exit
The above list will be displayed the users to select any one option to perform the operation. Then we need some looping mechanism to display infinitely.
The C# allows to write the infinite the loop. It can be done in the for and while loop statement.
for(;;)
{
//Statement
}
while(true)
{
//Statement
}
The above statement allows to run infinitely in the C# programming.

Join the conversation! Your thoughts help the community grow.