Code inspection: Use <inheritdoc /> on root level to inherit documentation from base candidate
This inspection suggests using a root-level <inheritdoc /> tag when a member overrides or implements a documented base member but repeats its own XML documentation block without inheriting documentation. Using <inheritdoc /> can make the intent clearer and helps avoid duplicating or drifting documentation.
Example
public interface IC
{
/// <summary>Base summary</summary>
void Foo();
}
public class C : IC
{
/// <summary>New summary</summary>
public void Foo()
{
}
}
public interface IC
{
/// <summary>Base summary</summary>
void Foo();
}
public class C : IC
{
/// <inheritdoc />
/// <summary>New summary</summary>
public void Foo()
{
}
}
Quick-fix
Add a <inheritdoc /> tag to the XML documentation block.
01 April 2026