General rules for expressions with embedded expressions
The following rules apply to these kinds of expressions: parenthesized expressions (§7.6.3), element access expressions (§7.6.6), base access expressions with indexing (§7.6.8), increment and decrement expressions (§7.6.9, §7.7.5), cast expressions (§7.7.6), unary +, -, ~, * expressions, binary +, -, *, /, %, <<, >>, <, <=, >, >=, ==,!=, is, as, &, |, ^ expressions (§7.8, §7.9, §7.10, §7.11), compound assignment expressions (§7.17.2), checked and unchecked expressions (§7.6.12), plus array and delegate creation expressions (§7.6.10). Each of these expressions has one or more sub-expressions that are unconditionally evaluated in a fixed order. For example, the binary % operator evaluates the left hand side of the operator, then the right hand side. An indexing operation evaluates the indexed expression, and then evaluates each of the index expressions, in order from left to right. For an expression expr, which has sub-expressions expr1, expr2,..., exprn, evaluated in that order: · The definite assignment state of v at the beginning of expr1 is the same as the definite assignment state at the beginning of expr. · The definite assignment state of v at the beginning of expri (i greater than one) is the same as the definite assignment state at the end of expri-1. · The definite assignment state of v at the end of expr is the same as the definite assignment state at the end of exprn.
|