The Break Statement

The Break statement exits the nearest enclosing loop.

break-statement:

Break

The target of the Break statement is the end point of the nearest enclosing loop. If this statement is not enclosed by a loop, a compile error occurs.

The Break statement cannot exit the Finally block. When this statement occurs within the Finally block, the target of the break statement must be within the same Finally block. Otherwise, a compile error occurs.

Example

Private Sub TestContinue();
Var
    b: boolean;
Begin
    Repeat
        //Code executed in cycle
        If MessageBox.Show("Result is incorrect. Repeat calculation?",
            "Confirmation", MessageBoxButtons.OKCancel) = DialogResult.OK Then
            Continue;
        Else
            Break
        End If;
        //Code, executed after confirmation
    Until b;
End Sub;

See also:

Jump Statements