13.07.2015 Views

C# Language Specification - Willy .Net

C# Language Specification - Willy .Net

C# Language Specification - Willy .Net

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>C#</strong> LANGUAGE SPECIFICATION12.3.3.10 Break, continue, and goto statementsThe definite assignment state of v on the control flow transfer caused by a break, continue, or gotostatement is the same as the definite assignment state of v at the beginning of the statement.12.3.3.11 Throw statementsFor a statement stmt of the formthrow expr ;the definite assignment state of v at the beginning of expr is the same as the definite assignment state of v atthe beginning of stmt.12.3.3.12 Return statementsFor a statement stmt of the formreturn expr ;• The definite assignment state of v at the beginning of expr is the same as the definite assignmentstate of v at the beginning of stmt.• If v is an output parameter, then it must be definitely assigned either:o after expro or at the end of the finally block of a try-finally or try-catch-finally thatencloses the return statement.For a statement stmt of the form:return ;• If v is an output parameter, then it must be definitely assigned either:o before stmto or at the end of the finally block of a try-finally or try-catch-finally thatencloses the return statement.12.3.3.13 Try-catch statementsFor a statement stmt of the form:try try-blockcatch(…) catch-block-1…catch(…) catch-block-n• The definite assignment state of v at the beginning of try-block is the same as the definiteassignment 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 thedefinite 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 isdefinitely assigned at the end-point of try-block and every catch-block-i (for every i from 1 to n).12.3.3.14 Try-finally statementsFor a try statement stmt of the form:try try-block finally finally-block106

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!