Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

There 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:

/// <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:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

AArnottcommented, Sep 27, 2020

Interesting. Thanks for the info.

scottdormancommented, Sep 27, 2020

It’s a bit of nit, to be fair, but the <see langword="null"/> translates to null reference (Nothing in Visual Basic) as text. Really, this applies to true and false as well.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found