简体   繁体   English

如何在Visual Studio中配置方法的摘要注释

[英]How to configure summary comment on method in Visual Studio

When typing "///" above the method in Visual Studio, it generates XML summary. 在Visual Studio中的方法上方键入“ ///”时,它将生成XML摘要。 For example: 例如:

    /// <summary>
    /// 
    /// </summary>
    /// <param name="par1"></param>
    /// <param name="par2"></param>
    /// <returns></returns>
    public string Foo(int par1, string par2)
    {
        return "";
    }

Is there a setting somewhere where I can stop adding the following line? 是否有可以停止添加以下行的设置?

/// <returns></returns>

After some more research and several comments, I don't believe there is such setting or feature to customize the auto addition of 经过更多研究和评论后,我认为没有这样的设置或功能可以自定义自动添加

//<returns></returns>

This applies to VS2017 and earlier. 这适用于VS2017及更早版本。 Maybe this will be come a feature sometime in the future. 也许将来某个时候会成为一个功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM