gpt4 book ai didi

c# - 如何在 C# .NET 文档中添加换行符

转载 作者:行者123 更新时间:2023-11-30 18:13:05 29 4
gpt4 key购买 nike

这应该更容易......

我想在我的代码中向 XML 文档添加一个“编码”换行符

/// <summary>
/// Get a human-readable variant of the SQL WHERE statement of the search element. &lt;br/&gt;
/// 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>

如您所见,我找到了一些演示添加 < 和 > 括号的答案。有趣的是,好的 'ol < br/> 换行符不会在 Intellisense 弹出窗口中创建换行符。

我觉得这很烦人......

有什么建议吗?

最佳答案

您可以使用 <para />标记以产生段落分隔符,或者您可以将文本换行在 <para></para> 中标记作为对文本进行分组并在其后添加空行的一种方式,但没有等同于 <br /> 的方法或类似的东西。 (根据 this 旧的 MS 论坛帖子是设计使然。)您可以从 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>

关于c# - 如何在 C# .NET 文档中添加换行符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53503491/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com