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


18 Structs
18.3 Class and struct differences
18.3.3 Assignment
Paragraph 11 Assignment to a variable of a struct type creates a copy of the value being assigned. 2 This differs from assignment to a variable of a class type, which copies the reference but not the object identified by the reference.
Paragraph 21 Similar to an assignment, when a struct is passed as a value parameter or returned as the result of a function member, a copy of the struct is created. 2 A struct may be passed by reference to a function member using a ref or out parameter.
Paragraph 31 When a property or indexer of a struct is the target of an assignment, the instance expression associated with the property or indexer access must be classified as a variable. 2 If the instance expression is classified as a value, a compile-time error occurs. 3 This is described in further detail in §14.13.1. |
Jagger Software Ltd |
Company # 4070126 |
VAT # 762 5213 42 |

