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
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5677,15 +5677,15 @@ record_class_declaration
5677
5677
;
5678
5678
```
5679
5679
5680
-
A *record_class_declaration* consists of an optional set of *attributes* ([§21](attributes.md#21-attributes)), followed by an optional set of *class_modifier*s ([§14.2.2](classes.md#1422-class-modifiers)), followed by an optional `partial` modifier ([§14.2.7](classes.md#1427-partial-declarations)), followed by the keyword `record` and an *identifier* that names the class, followed by an optional *type_parameter_list* ([§14.2.3](classes.md#1423-type-parameters)), followed by an optional *delimited_parameter_list* ([§15.6.2.1](classes.md#15621-general)), followed by an optional *class_base* specification ([§14.2.4](classes.md#1424-class-base-specification)), followed by an optional set of *type_parameter_constraints_clause*s ([§14.2.5](classes.md#1425-type-parameter-constraints)), followed by a *record_class_body* (§rec-class-record-class-body).
5680
+
A *record_class_declaration* consists of an optional set of *attributes* ([§23](attributes.md#23-attributes)), followed by an optional set of *class_modifier*s ([§15.2.2](classes.md#1522-class-modifiers)), followed by an optional `partial` modifier ([§15.2.7](classes.md#1527-partial-declarations)), followed by the keyword `record` and an *identifier* that names the class, followed by an optional *type_parameter_list* ([§15.2.3](classes.md#1523-type-parameters)), followed by an optional *delimited_parameter_list* ([§15.6.2.1](classes.md#15621-general)), followed by an optional *class_base* specification ([§15.2.4](classes.md#1524-class-base-specification)), followed by an optional set of *type_parameter_constraints_clause*s ([§15.2.5](classes.md#1525-type-parameter-constraints)), followed by a *record_class_body* (§rec-class-record-class-body).
5681
5681
5682
5682
*class_modifier* shall not be `static`.
5683
5683
5684
5684
A *record_class_declaration* having a *delimited_parameter_list* declares a ***positional record class***.
5685
5685
5686
5686
At most only one partial type declaration of a partial record class may provide a *delimited_parameter_list*.
5687
5687
5688
-
Parameters in *delimited_parameter_list* shall not have `ref`, `out` or `this` modifiers; however, `in` and `params` modifiers are permitted.
5688
+
Parameters in *delimited_parameter_list* shall not have `ref`, `out` or `this` modifiers; however, `in` and `params` modifiers are permitted.
5689
5689
5690
5690
### §rec-class-class-base-specification Class base specification
5691
5691
@@ -5747,7 +5747,7 @@ A ***copy constructor*** for a type `T` is a constructor having a single paramet
5747
5747
> }
5748
5748
> }
5749
5749
> ````
5750
-
>
5750
+
>
5751
5751
>Thisdeclaresamutable, non-recordclasswith two read-write properties, and a user-written copy constructor.
5752
5752
>
5753
5753
> In the following case,
@@ -5756,7 +5756,7 @@ A ***copy constructor*** for a type `T` is a constructor having a single paramet
5756
5756
> ```csharp
5757
5757
> record Person(intAge, stringName);
5758
5758
> ````
5759
-
>
5759
+
>
5760
5760
>therecordclassis immutable. The synthesized auto properties `Age` and `Name` are read-init. A copy constructor is synthesized, as is a primary constructor. *end example*
5761
5761
5762
5762
In certain circumstances (§rec-class-copyclone), a copy constructor may be synthesized by the compiler, and called by synthesized code.
0 commit comments