Docs: inheritdoc is per member?

Created on 4 Mar 2020  Â·  6Comments  Â·  Source: dotnet/docs

For example with this interface:
/// <summary>
/// You may have some primary information about this interface.
/// </summary>
public interface ITestInterface
{
/// <summary>
/// Method documentation.
/// </summary>
void Method();
}

///<inheritdoc cref="ITestInterface"/>
public class TestClass : ITestInterface
{
public void Method()
{
{
}

Method in TestClass will inherit the documentation also or do I have to add another <nheritdoc /> in Method as well?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Area - C# Guide Technology - C# Fundamentals P2 Pri2 csharp-fundamentaltech doc-bug dotnet-csharprod

Most helpful comment

The method in TestClass will inherit the documentation also and dont need to add another inheritdoc tag.

All 6 comments

/cc @mikadumont

Can you provide the answer? Then, we can get this doc updated.

The method in TestClass will inherit the documentation also and dont need to add another inheritdoc tag.

@mikadumont In that case there will be any changes in CS1591?

Right now if I remove the documentation from the method I get a warning,

Adding @sharwell

The CS1591 warning would be related to https://github.com/dotnet/roslyn/issues/40325

/cc @dotnet/roslyn-compiler

Thanks for helping determine the correct update. I've added this to our backlog for when we next update this article.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sdmaclea picture sdmaclea  Â·  3Comments

Manoj-Prabhakaran picture Manoj-Prabhakaran  Â·  3Comments

gmatv picture gmatv  Â·  3Comments

svick picture svick  Â·  3Comments

stjepan picture stjepan  Â·  3Comments