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


12 Variables
12.3 Definite assignment
12.3.3 Precise rules for determining definite assignment
12.3.3.1 General rules for statements- 1 v is not definitely assigned at the beginning of a function member body.
- 2 v is definitely assigned at the beginning of any unreachable statement.
- 3 The definite assignment state of v at the beginning of any other statement is determined by checking the definite assignment state of v on all control flow transfers that target the beginning of that statement. 4 If (and only if) v is definitely assigned on all such control flow transfers, then v is definitely assigned at the beginning of the statement. 5 The set of possible control flow transfers is determined in the same way as for checking statement reachability (§15.1).
- 6 The definite assignment state of v at the end point of a block, checked, unchecked, if, while, do, for, foreach, lock, using, or switch statement is determined by checking the definite assignment state of v on all control flow transfers that target the end point of that statement. 7 If v is definitely assigned on all such control flow transfers, then v is definitely assigned at the end point of the statement. 8 Otherwise, v is not definitely assigned at the end point of the statement. 9 The set of possible control flow transfers is determined in the same way as for checking statement reachability (§15.1).
|
Jagger Software Ltd |
Company # 4070126 |
VAT # 762 5213 42 |

