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.1 Variable categories 12.1.6 Output parameters
Paragraph 11 A parameter declared with an out modifier is an output parameter.
Paragraph 21 An output parameter does not create a new storage location. 2 Instead, an output parameter represents the same storage location as the variable given as the argument in the function member invocation. 3 Thus, the value of an output parameter is always the same as the underlying variable.
Paragraph 31 The following definite assignment rules apply to output parameters. [Note: The rules for reference parameters are different, and are described in §12.1.5. end note]
Paragraph 41 Within an instance constructor of a struct type, the this keyword behaves exactly as an output parameter of the struct type (§14.5.7).
- 2 A variable need not be definitely assigned before it can be passed as an output parameter in a function member invocation.
- 3 Following the normal completion of a function member invocation, each variable that was passed as an output parameter is considered assigned in that execution path.
- 4 Within a function member, an output parameter is considered initially unassigned.
- 5 Every output parameter of a function member must be definitely assigned (§12.3) before the function member returns normally.
|Jagger Software Ltd|
|Company # 4070126|
|VAT # 762 5213 42|