#1,125 – Use of break and continue Statements
June 25, 2014 1 Comment
You can use the break statement to break out of a loop or switch statement, resuming execution at the endpoint of the enclosing statement.
You can use break within a switch statement or within while, do, for or foreach loops.
You can use the continue statement to jump unconditionally to the endpoint of the body of statements enclosed within a loop. This will either cause execution to continue with the next iteration of the loop or will continue execution after the loop if the final iteration was being executed.
You can use continue within a while, do, for or foreach loop.