XML doc comments
See original GitHub issueThere are a lot of places in the doc comments where it uses the syntax of <c>null</c>
rather than <see langword="null"/>
, or doesn’t do anything and just uses plain text “null”. Should these be updated to use the <see langword="null"/>
syntax?
As an example, here is what the updated comment (for Requires.NotNull<T>(T, string?)
would look like:
https://github.com/AArnott/Validation/blob/2378284a62d732a89454564afca189b48e7ba5ba/src/Validation/Requires.cs#L19-L26
/// <summary>
/// Throws an exception if the the specified parameter's value is <see langword="null" />.
/// </summary>
/// <typeparam name="T">The type of the parameter.</typeparam>
/// <param name="value">The value of the argument.</param>
/// <param name="parameterName">The name of the parameter to include in any thrown exception.</param>
/// <returns>The value of the parameter.</returns>
/// <exception cref="ArgumentNullException">Thrown if <paramref name="value"/> is <see langword="null" />.</exception>
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
document APIs using /// comments
XML comment formats ... The use of XML doc comments requires delimiters that indicate where a documentation comment begins and ends. You use...
Read more >XML Documentation - C# in a Nutshell [Book]
XML Documentation C# offers three different styles of source-code documentation: single-line comments, multiline comments, and documentation comments.
Read more >XML Documentation Comments - RAD Studio
XML Doc comments are displayed in Help Insight (if parsed successfully) and, also, are included by the compiler when generating XML Documentation (as ......
Read more >CSharp — Documenting your code with XML comments
XML documentation comments are a special kind of comment, added above the definition of any user-defined type or member. They are special because...
Read more >XML Documentation Comments In C# | Pluralsight
XML comments can be utilized by the IntelliSense feature of Visual Studio and VS Code to show information about a type or member;...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Interesting. Thanks for the info.
It’s a bit of nit, to be fair, but the
<see langword="null"/>
translates tonull reference (Nothing in Visual Basic)
as text. Really, this applies totrue
andfalse
as well.