这应该会容易得多。
我想在我的代码中为XML文档添加一个“编码”的换行符
/// <summary>
/// Get a human-readable variant of the SQL WHERE statement of the search element. <br/>
/// Rather than return SQL, this method returns a string with icon-tokens, which
/// could be used to represent the search in a condensed pictogram format.
/// </summary>
正如您所看到的,我找到了一些演示添加<和>括号的答案。有趣的是,良好的< br/ >换行符不会在Intellisense弹出窗口中创建换行符。
我觉得这很烦人。
有什么建议吗?
发布于 2011-09-02 12:04:49
您可以使用<para />
标签来生成分段符,也可以将<para></para>
标签中的文本换行,以此作为对文本进行分组并在其后面添加空行的一种方式,但是<br />
或类似的东西是没有等价物的。(根据this以前的MS论坛帖子,这是设计出来的。)您可以从Documenting your code女士的文档文章中获得可用标记的列表
示例(基于原始OP示例):
/// <summary>
/// <para>Get a human-readable variant of the SQL WHERE statement of the search element.</para>
/// Rather than return SQL, this method returns a string with icon-tokens, which
/// could be used to represent the search in a condensed pictogram format.
/// </summary>
发布于 2019-08-31 09:17:47
从Visual Studio2019开始,注释中的换行符使用<br/>
。
示例:
/// <summary>
/// This is a comment.<br/>
/// This is another comment <br/>
/// This is a long comment so i want it to continue <br/> on another line.
/// </summary>
请注意,当我们使用<br/>
而不是<para>
时,没有添加额外的行。
发布于 2014-09-02 10:56:43
这是我的用法,就像<br/>
一样,它是有效的:)
/// <summary>
/// Value: 0/1/2
/// <para/>0 foo,
/// <para/>1 bar,
/// <para/>2 other
/// </summary>
https://stackoverflow.com/questions/7279108
复制相似问题