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: prompts/csharp-docs.prompt.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,17 @@ description: 'Ensure that C# types are documented with XML comments and follow b
10
10
- It is encouraged to document internal members as well, especially if they are complex or not self-explanatory.
11
11
- Use `<summary>` for method descriptions. This should be a brief overview of what the method does.
12
12
- Use `<param>` for method parameters.
13
+
- Use `<paramref>` to reference parameters in documentation.
13
14
- Use `<returns>` for method return values.
14
15
- Use `<remarks>` for additional information, which can include implementation details, usage notes, or any other relevant context.
15
16
- Use `<example>` for usage examples on how to use the member.
16
17
- Use `<exception>` to document exceptions thrown by methods.
17
-
- Use `<see>` and `<seealso>` for references to other types or members.
18
+
- Use `<see langword>` for language-specific keywords like `null`, `true`, `false`, `int`, `bool`, etc.
19
+
- Use `<see cref>` to reference other types or members inline (in a sentence).
20
+
- Use `<seealso>` for standalone (not in a sentence) references to other types or members in the "See also" section of the online docs.
18
21
- Use `<inheritdoc/>` to inherit documentation from base classes or interfaces.
19
22
- Unless there is major behavior change, in which case you should document the differences.
20
23
- Use `<typeparam>` for type parameters in generic types or methods.
21
24
- Use `<typeparamref>` to reference type parameters in documentation.
22
25
- Use `<c>` for inline code snippets.
23
-
- Use `<code>` for code blocks.
24
-
- Use `<see langword>` for language specific keywords like `null`, `true`, `false`, `int`, `bool`, etc.
26
+
- Use `<code>` for code blocks. `<code>` tags should be placed within an `<example>` tag. Add the language of the code example using the `language` attribute, for example, `<code language="csharp">`.
0 commit comments