X hits on this document

759 views

0 shares

0 downloads

0 comments

103 / 396

C# LANGUAGE SPECIFICATION

If the for-condition is omitted from the for statement, then evaluation of definite assignment proceeds as if for-condition were replaced with true in the above expansion.

5.3.3.10 Break, continue, and goto statements

The definite assignment state of v on the control flow transfer caused by a break, continue, or goto statement is the same as the definite assignment state of v at the beginning of the statement.

5.3.3.11 Throw statements

For a statement stmt of the form

throw expr ;

The definite assignment state of v at the beginning of expr is the same as the definite assignment state of v at the beginning of stmt.

5.3.3.12 Return statements

For a statement stmt of the form

return expr ;

The definite assignment state of v at the beginning of expr is the same as the definite assignment state of v at the beginning of stmt.

If v is an output parameter, then it must be definitely assigned either:

after expr

or at the end of the finally block of a try-finally or try-catch-finally that encloses the return statement.

For a statement stmt of the form:

return ;

If v is an output parameter, then it must be definitely assigned either:

before stmt

or at the end of the finally block of a try-finally or try-catch-finally that encloses the return statement.

5.3.3.13 Try-catch statements

For a statement stmt of the form:

try try-block catch(...) catch-block-1 ... catch(...) catch-block-n

The definite assignment state of v at the beginning of try-block is the same as the definite assignment state of v at the beginning of stmt.

The definite assignment state of v at the beginning of catch-block-i (for any i) is the same as the definite assignment state of v at the beginning of stmt.

The definite assignment state of v at the end-point of stmt is definitely assigned if (and only if) v is definitely assigned at the end-point of try-block and every catch-block-i (for every i from 1 to n).

5.3.3.14 Try-finally statements

For a try statement stmt of the form:

try try-block finally finally-block

90Copyright Microsoft Corporation 1999-2003. All Rights Reserved.

Document info
Document views759
Page views759
Page last viewedFri Dec 02 23:14:47 UTC 2016
Pages396
Paragraphs9401
Words133190

Comments