Which C# XML documentation comment tag is used for 'true', 'false' and 'null'?

C#StylesLiteralsXml Documentation

C# Problem Overview


Which C# XML documentation comment tag is used for the literals true, false and null?

In Microsoft's own documentation, these literals appear in bold text. For example, the documentation for the property ArrayList.IsFixedSize appears as:

> true if the ArrayList has a fixed size; otherwise, false. The default is false.

None of Microsoft's Recommended Tags seem to apply to this situation. The best fit appears to be <c>, however <c>true</c> appears as true when the documentation is rendered by Doxygen.

However, using <b>true</b> with Doxygen yielded bold text as I surmised that it might. But that leaves me wondering about the portability of using standard HTML tags with other documentation generation tools such as Sandcastle and GhostDoc.

C# Solutions


Solution 1 - C#

You should use the <see langword="true"/> entry so that it works right for whatever language is being used.

Solution 2 - C#

Per GhostDoc's behavior, <c>true</c> is the correct answer. I've voted up saravanan's comment now that I've been able to confirm it.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDavidRRView Question on Stackoverflow
Solution 1 - C#GargoyleView Answer on Stackoverflow
Solution 2 - C#Jack PinesView Answer on Stackoverflow