Table of Contents 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Notes DownloadECMA-334 C# Language Specification 15 Statements 15.9 Jump statements 15.9.2 The continue statement
Paragraph 11 The continue statement starts a new iteration of the nearest enclosing while, do, for, or foreach statement. continue-statement : continue ;
Paragraph 21 The target of a continue statement is the end point of the embedded statement of the nearest enclosing while, do, for, or foreach statement. 2 If a continue statement is not enclosed by a while, do, for, or foreach statement, a compile-time error occurs.
Paragraph 31 When multiple while, do, for, or foreach statements are nested within each other, a continue statement applies only to the innermost statement. 2 To transfer control across multiple nesting levels, a goto statement (§15.9.3) must be used.
Paragraph 41 A continue statement cannot exit a finally block (§15.10). 2 When a continue statement occurs within a finally block, the target of the continue statement must be within the same finally block; otherwise a compile-time error occurs.
Paragraph 51 A continue statement is executed as follows:
Paragraph 61 Because a continue statement unconditionally transfers control elsewhere, the end point of a continue statement is never reachable.
- 2 If the continue statement exits one or more try blocks with associated finally blocks, control is initially transferred to the finally block of the innermost try statement. 3 When and if control reaches the end point of a finally block, control is transferred to the finally block of the next enclosing try statement. 4 This process is repeated until the finally blocks of all intervening try statements have been executed.
- 5 Control is transferred to the target of the continue statement.
|Jagger Software Ltd|
|Company # 4070126|
|VAT # 762 5213 42|