Is there a standard method for updating Documentation Comments to reflect the name of the subclass rather than the base class? Also, if a method does exist, is this something I should practice or avoid?
Example:
class BaseClass
{
/// <summary>
/// Gets or sets a value associated with the name of the BaseClass
/// </summary>
protected string Name { get; set; }
}
class SubClass : BaseClass
{
/// Gets or sets a value associated with the name of the Subclass <-- updated
/// protected string Name { get; set; } <-- defined on BaseClass
}
No. The documentation applies to the implemented code only – if your class inherits a method from its base class, then the documentation is also inherited. You cannot ‘override’ the documentation without also providing a new implementation. (this makes sense though – if the implementation hasn’t changed, then the docs don’t need to change either.)
If you browse the docs in an external form or in intellisense, the docs from the base class will be displayed as required, so there is no need to redefine them in order to see the appropriate docs.