The break statement may appear only within the context of a repetition statement (while, do, for, or foreach). It provides a way to exit from the repetition statement prematurely.
(Exception: A break statement may also appear within the context of a switch statement, described below, but it serves a different purpose.)
General Form
break;
When a break statement is encountered, control transfers immediately to the statement that follows the repetition statement, just as though the repetition statement had ended normally.
General Form
continue;
The continue statement, also, may appear only within the context of a repetition statementIt provides a way to cancel the current cycle of repetition, and jump immediately to the re-testing of the expression.