You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: standard/classes.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -5117,10 +5117,10 @@ The static constructor for a closed class executes at most once in a given appli
5117
5117
5118
5118
If a class contains the `Main` method ([§7.1](basic-concepts.md#71-application-startup)) in which execution begins, the static constructor for that class executes before the `Main` method is called.
5119
5119
5120
-
To initialize a new closed class type, first a new set of static fields (§15.5.2) for that particular closed type shall be created. Each of the static fields shall be initialized to its default value (§15.5.5). Following this:
5120
+
To initialize a new closed class type, first a new set of static fields ([§15.5.2](classes.md#1552-static-and-instance-fields)) for that particular closed type shall be created. Each of the static fields shall be initialized to its default value ([§15.5.5](classes.md#1555-field-initialization)). Following this:
5121
5121
5122
5122
- If there is either no static constructor or a non-extern static constructor then:
5123
-
- the static field initializers (§15.5.6.2) shall be executed for those static fields;
5123
+
- the static field initializers ([§15.5.6.2](classes.md#15562-static-field-initialization)) shall be executed for those static fields;
5124
5124
- then the non-extern static constructor, if any, shall be executed.
5125
5125
- Otherwise if there is an extern static constructor it shall be executed. Static variable initializers are not required to be executed by extern static constructors.
0 commit comments