Hi,
thank you for the comment and the reply.
I was indeed providing a simplified code example here. I have tried it again with exactly the code I wrote here and it does work. I'm having this problem because in my actual code the overridden method also has a couple of arguments, which I only wanted to describe in the top level method and then use that description in the overrides. What I did to that end was this:
public class TopLevel
{
/// <summary>
/// Top level text.
/// </summary>
/// <param name="argument1">The first method argument.</param>
/// <param name="argument2">The second method argument.</param>
protected virtual void Method(object argument1, object argument2) { }
}
public class SecondLevel : TopLevel
{
/// <summary>
/// <inheritdoc/>
/// <para>
/// Second level text.
/// </para>
/// </summary>
/// <inheritdoc/>
protected override void Method(object argument1, object argument2) { }
}
public class ThirdLevel : SecondLevel
{
/// <summary>
/// <inheritdoc/>
/// <para>
/// Third level text.
/// </para>
/// </summary>
/// <inheritdoc/>
protected override void Method(object argument1, object argument2) { }
}
I apologize for the confusion.
Writing the second <inheritdoc/> tag after </summary> loads the descriptions of all attributes, which is what I was looking for. In the first overload this ends up as intended, but in the second overload this results in the "Top level text" being displayed twice in IntelliSense.
I have since learned that if I do
/// <param name="argument1"><inheritdoc/></param>
/// <param name="argument2"><inheritdoc/></param>
instead, then the overall result is as intended. Of course this isn't quite as simple as I wanted, is there any way to have the top level descriptions for all arguments loaded with one tag? If not, I can live with this solution as well.
Thanks and best regards