Skip to content

Commit 08e960e

Browse files
committed
Merge pull request #2297 from Jericho/SA1642_struct
SA1642 - Provide a sample constructor documentation for a struct
1 parent 3a3d5da commit 08e960e

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

documentation/SA1642.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## SA1642
1+
## SA1642
22

33
<table>
44
<tr>
@@ -41,6 +41,17 @@ public Customer()
4141
}
4242
```
4343

44+
If documenting a struct, the summary must contain the word 'struct' instead of 'class'. For example, the following shows the constructor for the `MyStruct` struct.
45+
46+
```csharp
47+
/// <summary>
48+
/// Initializes a new instance of the <see cref="MyStruct"/> struct.
49+
/// </summary>
50+
public MyStruct()
51+
{
52+
}
53+
```
54+
4455
If the class contains generic parameters, these can be annotated within the `cref` link using either of the following
4556
two formats:
4657

0 commit comments

Comments
 (0)