[英]Which C# XML documentation comment tag is used for 'true', 'false' and 'null'?
Which C# XML documentation comment tag is used for the literals true
, false
and null
?哪个 C# XML 文档注释标记用于文字
true
、 false
和null
?
In Microsoft's own documentation, these literals appear in bold text .在 Microsoft 自己的文档中,这些文字以粗体显示。 For example, the documentation for the property ArrayList.IsFixedSize appears as:
例如,属性ArrayList.IsFixedSize的文档显示为:
true if the ArrayList has a fixed size;
如果ArrayList具有固定大小,则为true ; otherwise, false .
否则为false 。 The default is false .
默认值为false 。
None of Microsoft's Recommended Tags seem to apply to this situation. Microsoft 的推荐标签似乎都不适用于这种情况。 The best fit appears to be <c> , however
<c>true</c>
appears as true
when the documentation is rendered by Doxygen .最合适的似乎是<c> ,但是
<c>true</c>
在文档由Doxygen呈现时显示为true
。
However, using <b>true</b>
with Doxygen yielded bold text as I surmised that it might.但是,将
<b>true</b>
与 Doxygen 结合使用会产生粗体文本,正如我猜测的那样。 But that leaves me wondering about the portability of using standard HTML tags with other documentation generation tools such as Sandcastle and GhostDoc .但这让我想知道将标准 HTML 标记与其他文档生成工具(如Sandcastle和GhostDoc )一起使用的可移植性。
您应该使用<see langword="true"/>
条目,以便它适用于正在使用的任何语言。
Per GhostDoc's behavior, <c>true</c>
is the correct answer.根据 GhostDoc 的行为,
<c>true</c>
是正确答案。 I've voted up saravanan's comment now that I've been able to confirm it.既然我已经能够确认它,我已经投票支持了 saravanan 的评论。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.