是否有用于扩展多行注释的扩展名?

问题描述 投票:0回答:1

在Visual Studio中,使用C#方法的以下XML文档注释:

/// <summary>
/// First line is very long long long long long long long long,
/// and the second is short.
/// </summary>
void Method()

是否有任何扩展名可以自动格式化以上注释,以免行太长?像这样:

/// <summary>
/// First line is very long long long long long
/// long long long and the second is short.
/// </summary>
c# visual-studio format comments
1个回答
0
投票

执行此操作的一种方法,添加para,该格式实际上会格式化段落中的注释。

/// <summary>
/// First line is very long long long long long
/// <para>long long long and the second is short.</para>
/// </summary>
void Method()

悬停时,调用此方法时,摘要注释以多行排列,如下图所示:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.