I'm using XML tags to document my program so I can see descriptions when I hover over my classes, methods, and such. I want to display a list on one of my classes like so:
/// <remarks>
/// <b>List of methods below</b>
/// <list type="table">
/// <listheader>
/// <term>
/// <see cref="MyMethod()"/>
/// </term>
/// <description>
/// <inheritdoc cref="MyMethod()"/>
/// </description>
/// </listheader>
/// </list>
/// </remarks>
public class MyClass
{
/// <summary>
/// Description of MyMethod()
/// </summary>
public void MyMethod()
{
// Do something
}
}
The problem is that <inheritdoc /> is not loading anything in the preview. However, When I move <inheritdoc /> outside of the <list>, with the exact same formatting, it displays perfectly. Is there any way to reference the description of MyMethod() within the list?
CodePudding user response:
<inheritdoc>
by default includes all members in the target XML comments. If you need the <summary>
you need to select it using the