c# - 我可以使用 ReSharper 生成类和方法摘要吗?

标签 c# comments resharper summary

我需要一种方便的方法来在 C# 中生成类 stub 或方法摘要。喜欢这个示例摘要:

public class TestClass
{
    /// <summary>DoWork is a method in the TestClass class. 
    /// <para>Here's how you could make a second paragraph in a description. <see cref="System.Console.WriteLine(System.String)"/> for information about output statements.</para>
    /// <seealso cref="TestClass.Main"/>
    /// </summary> 
    public static void DoWork(int Int1)

我无法在 ReSharper 中找到开箱即用的此类功能。我假设它的重构函数会有它,但他们似乎没有宣传它。

也许是因为开箱即用的 Visual Studio 有生成它的快捷方式?在那儿?将摘要添加到类或方法中有什么方便的方法?

最佳答案

如果您已将项目设置为生成 XML 文档,R# 将提供为公共(public)成员生成 XML 注释的选项。

如果您想要从类名和方法名中推断出文本文档的东西,那么 GhostDoc 就是您的选择。

如果您想为每个方法生成相同的结构,只需定义相应的实时模板或 VS 代码段即可。

关于c# - 我可以使用 ReSharper 生成类和方法摘要吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27725866/

相关文章:

c# - 为什么 Resharper intellisense 会替换我的代码?

c# - 无法构建 ASP.Net 容器

c# - 仅将更新的文件上传到 Blob 存储

c# - 使用 goto 语句从一种方法跳转到另一种方法

facebook - 一个关于facebook评论插件的简单问题

Resharper - 禁用未使用的公共(public)方法的通知

visual-studio-2013 - Resharper 8和Test Explorer在VS2013中找不到xUnit测试

c# - 将对象转换为 IEnumerable

Python:从css文件中提取注释

vim - 使用 vim 重排注释 block