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 17 Classes 17.4 Fields 17.4.1 Static and instance fields
Paragraph 11 When a field declaration includes a static modifier, the fields introduced by the declaration are static fields. 2 When no static modifier is present, the fields introduced by the declaration are instance fields.
Paragraph 21 Static fields and instance fields are two of the several kinds of variables (§12) supported by C#, and at times they are referred to as static variables and instance variables, respectively.
Paragraph 31 A static field is not part of a specific instance; instead, it identifies exactly one storage location. 2 No matter how many instances of a class are created, there is only ever one copy of a static field for the associated application domain.
Paragraph 41 An instance field belongs to an instance. 2 Specifically, every instance of a class contains a separate set of all the instance fields of that class.
Paragraph 51 When a field is referenced in a member-access (§14.5.4) of the form E.M, if M is a static field, E must denote a type that has a field M, and if M is an instance field, E must denote an instance of a type that has a field M.
Paragraph 61 The differences between static and instance members are discussed further in §17.2.5.
|Jagger Software Ltd|
|Company # 4070126|
|VAT # 762 5213 42|