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.8 Iteration statements 15.8.2 The do statement
Paragraph 11 The do statement conditionally executes an embedded statement one or more times. do-statement : do embedded-statement while ( boolean-expression ) ;
Paragraph 21 A do statement is executed as follows:
Paragraph 31 Within the embedded statement of a do statement, a break statement (§15.9.1) may be used to transfer control to the end point of the do statement (thus ending iteration of the embedded statement), and a continue statement (§15.9.2) may be used to transfer control to the end point of the embedded statement (thus performing another iteration of the do statement).
Paragraph 41 The embedded statement of a do statement is reachable if the do statement is reachable.
Paragraph 51 The end point of a do statement is reachable if at least one of the following is true:
- 2 Control is transferred to the embedded statement.
- 3 When and if control reaches the end point of the embedded statement (possibly from execution of a continue statement), the boolean-expression (§14.16) is evaluated. 4 If the boolean expression yields true, control is transferred to the beginning of the do statement. 5 Otherwise, control is transferred to the end point of the do statement.
- 2 The do statement contains a reachable break statement that exits the do statement.
- 3 The end point of the embedded statement is reachable and the boolean expression does not have the constant value true.
|Jagger Software Ltd|
|Company # 4070126|
|VAT # 762 5213 42|