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.2 Default values
Paragraph 11 The following categories of variables are automatically initialized to their default values: - 2 Static variables.
- 3 Instance variables of class instances.
- 4 Array elements.
Paragraph 21 The default value of a variable depends on the type of the variable and is determined as follows: - 2 For a variable of a value-type, the default value is the same as the value computed by the value-type's default constructor (§11.1.1).
- 3 For a variable of a reference-type, the default value is null.
[Note: Initialization to default values is typically done by having the memory manager or garbage collector initialize memory to all-bits-zero before it is allocated for use. For this reason, it is convenient to use all-bits-zero to represent the null reference. end note] |
Jagger Software Ltd |
Company # 4070126 |
VAT # 762 5213 42 |

