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: documentation/SA1600.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,10 @@ C# syntax provides a mechanism for inserting documentation for classes and eleme
25
25
26
26
A violation of this rule occurs if an element is completely missing a documentation header, or if the header is empty. In C# the following types of elements can have documentation headers: classes, constructors, delegates, enums, events, finalizers, indexers, interfaces, methods, properties, records, and structs.
27
27
28
+
### Records and primary constructors
29
+
30
+
Record classes and record structs follow the same expectations as classes and structs. Positional parameters in a record declaration become properties; when documenting a public record, include `<param>` tags for those parameters in addition to the `<summary>` text for the record itself.
31
+
28
32
### Default interface members
29
33
30
34
Interface members are implicitly `public` unless otherwise specified. Default interface members (methods, properties, indexers, events, etc. that include implementations) follow these rules:
Copy file name to clipboardExpand all lines: documentation/SA1642.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,8 @@ public MyStruct()
52
52
}
53
53
```
54
54
55
+
For C# 9 record types, constructors follow the same pattern: record classes use the word 'class' in the summary text, while record structs use 'struct'.
56
+
55
57
If the class contains generic parameters, these can be annotated within the `cref` link using either of the following
0 commit comments