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


14 Expressions
14.13 Assignment operators
Paragraph 11 The assignment operators assign a new value to a variable, a property, event, or an indexer element. assignment : unary-expression assignment-operator expression assignment-operator : one of = += -= *= /= %= &= |= ^= <<= >>=
Paragraph 21 The left operand of an assignment must be an expression classified as a variable, a property access, an indexer access, or an event access.
Paragraph 31 The = operator is called the simple assignment operator. 2 It assigns the value of the right operand to the variable, property, or indexer element given by the left operand. 3 The left operand of the simple assignment operator may not be an event access (except as described in §17.7.1). 4 The simple assignment operator is described in §14.13.1.
Paragraph 41 The operators formed by prefixing a binary operator with an = character are called the compound assignment operators. 2 These operators perform the indicated operation on the two operands, and then assign the resulting value to the variable, property, or indexer element given by the left operand. 3 The compound assignment operators are described in §14.13.2.
Paragraph 51 The += and -= operators with an event access expression as the left operand are called the event assignment operators. 2 No other assignment operator is valid with an event access as the left operand. 3 The event assignment operators are described in §14.13.3.
Paragraph 61 The assignment operators are right-associative, meaning that operations are grouped from right to left. 2 For example, an expression of the form a = b = c is evaluated as a = (b = c). |
Jagger Software Ltd |
Company # 4070126 |
VAT # 762 5213 42 |

