XML comments for override properties

I am using MonoDevelop 2.4.2 for OS X (the version that ships with Unity 3.4.1) and wondered if there is a way to inherit comments from a base class or property.

Example:

public class Foo { /// <summary> /// The describes the ABC property /// </summary> public virtual int ABC { get { return _abc; } set { _abc = value; } } protected int _abc; /// <summary> /// The describes the XYZ property /// </summary> public virtual int XYZ { get { return _xyz; } set { _xyz = value; } } protected int _xyz; } public class Bar : Foo { public override int ABC { set { // DO SOMETHING base.ABC = value; } } } Bar bar = new Bar(); // In MonoDevelop 2.4.2 (OS X), the ABC property doesn't show the comments // in the autocomplete popup or when you hover the mouse over the property. int abc = bar.ABC; // ... but they do show up for XYZ, because it doesn't override int xyz = bar.XYZ; 

This question seems a bit like Comment Inheritance for C # (in fact, any language) , although I'm mostly concerned about how they behave in the editor at the moment, and this is typical for MonoDevelop.

Some of the solutions in this question relate to <inheritdoc />, which does not seem valid in MonoDevelop (or I use it incorrectly), but Ghostdoc for Visual Studio.

It seems that the only solution would be to duplicate property comments in an inherited class. Are there any alternatives?

+8
override c # properties unity3d monodevelop
source share
1 answer

I cannot confirm this, but the name DocFood was added earlier, which is now part of MonoDevelop (latest version 2.8. * I think). Try it, I think it can inherit comments from the parent implementation.

+1
source share

All Articles