评论继承了C#(实际上任何语言) [英] Comment Inheritance for C# (actually any language)

查看:101
本文介绍了评论继承了C#(实际上任何语言)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假如我有这个接口

public interface IFoo
{
    ///<summary>
    /// Foo method
    ///</summary>
    void Foo();

    ///<summary>
    /// Bar method
    ///</summary>
    void Bar();

    ///<summary>
    /// Situation normal
    ///</summary>
    void Snafu();
}

和这个类

public class Foo : IFoo
{
    public void Foo() { ... }
    public void Bar() { ... }
    public void Snafu() { ... }
}

有没有一种方法,还是有一个工具,可以让我自动摆在每个成员的意见在基类或接口?

Is there a way, or is there a tool that can let me automatically put in the comments of each member in a base class or interface?

由于我讨厌重新编写每个派生子类相同的意见!

Because I hate re-writing the same comments for each derived sub-class!

推荐答案

GhostDoc 正是这么做的。对于还没有继承的方法,它试图创建一个描述出了名的。

GhostDoc does exactly that. For methods which aren't inherited, it tries to create a description out of the name.

FlingThing()变为甩东西

FlingThing() becomes "Flings the Thing"

这篇关于评论继承了C#(实际上任何语言)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆