Save comments when overriding

Is there a way (tool or something) that does not duplicate the same XML comments when inheriting / overriding methods from base classes?

For instance:.

/// <summary>
/// Represent a brand new object in .NET
/// </summary>
public class MyObject : Object
{
    /// <summary>
    /// Copy-Paste the same Xml comment 
    /// like in the base class is boring!
    /// </summary>
    /// <param name="obj">and params too!! ((</param>
    /// <returns>this one too!!! (((</returns>
    public override bool Equals(object obj)
    {
        return base.Equals(obj);
    }
}
+3
source share
2 answers

I think you are looking for inheritdoc:

/// <inheritdoc />
public override bool Equals(object obj)

This is not a standard tag (therefore, Intellisense may not support it, for example), but it is used quite often - in particular, Sandcastle supports it .

+7
source

, GhostDoc . .

, IntelliSense , .

+4

All Articles