Watch C# while Loop
- 2019
- 5 min
The while loop repeatedly executes a block of code inside the loop while the given logical expression is true; otherwise, it breaks. This type of loop is useful when the number of loop iterations does not need to be known before the loop begins, and a counter variable is not needed. Any variable initialization and updating need to be managed by you.n