![](/img/trans.png)
[英]Can I refresh an XML comment in Visual Studio to reflect parameters that have changed?
[英]Is there a way that I can show comment parameters for a method in the Visual Studio IDE?
我有方法:
/// <summary>
/// Updates Phrase SELECTED and either CATEGORY or CardChoice
/// </summary>
/// <param name="selected">True or False</param>
public void UpdateSelected(bool selected)
{
将显示“摘要”信息,但没有关于参数的注释。
有什么办法可以显示参数及其注释“ True or False”?
我使用称为GhostDoc的VS扩展,它具有比三重斜杠更详细的xml注释。 它根据您的方法名称,参数类型和名称以及方法的返回类型来填写描述。
将光标放在方法签名上的任何位置,然后Ctrl-Shift-D
以包含所有需要的信息。 您可能需要稍稍更改说明,但除此之外,它非常准确。
您还可以在<param>
标记中使用cref
属性来引用参数类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.