Next: , Previous: The Assignment, Up: Statements


6.11.3 The break Statement

The break statement leaves the foreach loop with Label.

     break Label;

If the label is omitted, it leaves the innermost foreach loop it is contained in. The break statement must be situated in the body of the foreach loop it wants to leave.