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/structs.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,7 @@ struct_body
114
114
115
115
## 16.3 Struct members
116
116
117
-
### §struct_general General
117
+
### 16.3.1 General
118
118
119
119
The members of a struct consist of the members introduced by its *struct_member_declaration*s and the members inherited from the type `System.ValueType`.
120
120
@@ -140,20 +140,20 @@ struct_member_declaration
140
140
141
141
Except for the differences noted in [§16.4](structs.md#164-class-and-struct-differences), the descriptions of class members provided in [§15.3](classes.md#153-class-members) through [§15.12](classes.md#1512-static-constructors) apply to struct members as well.
142
142
143
-
### §struct_readonly Readonly members
143
+
### 16.3.2 Readonly members
144
144
145
145
An instance member definition or accessor of an instance property, indexer, or event that includes the `readonly` modifier has the following restrictions:
146
146
147
147
- The `this` parameter is a `ref readonly` reference.
148
148
- The member shall not reassign the value of `this` or an instance field of the receiver.
149
-
- The member shall not reassign the value of an instance field-like event (§15.8.2) of the receiver.
149
+
- The member shall not reassign the value of an instance field-like event ([§15.8.2](classes.md#1582-field-like-events)) of the receiver.
150
150
- If a readonly member invokes a non-readonly member, the structure referred to by `this` must be copied to use a writable reference for the `this` argument.
151
151
152
-
> *Note:* Instance fields include the hidden backing field used for automatically implemented properties (§15.7.4). *end note*
152
+
> *Note:* Instance fields include the hidden backing field used for automatically implemented properties ([§15.7.4](classes.md#1574-automatically-implemented-properties)). *end note*
153
153
<!-- markdownlint-disable MD028 -->
154
154
155
155
<!-- markdownlint-enable MD028 -->
156
-
> *Example*: A readonly member can modify the state of an object referred to by an instance field, even though the readonly member can't reassign that instance member. The following code demonstrates the reassigning and modifying an instance field:
156
+
> *Example*: A readonly member can modify the state of an object referred to by an instance field, even though the readonly member can’t reassign that instance member. The following code demonstrates the reassigning and modifying an instance field:
0 commit comments