✅ Including documentation of the STL in a custom override
Hey there 👋
We're building a library that acts as a limited superset of the C# Standard Library
We'd have a method called
FooMathMin
that uses Math.Min
internally with some post-processing. It should have its own documentation followed by Math.Min
's original documentation if possible
The most obvious way to do so seems to use the <include/>
directive (https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/documentation-comments#d36-include) but the documentation is somewhat vague on which path
& file
to use
Is there a simple way to do this ?Documentation comments - C# language specification
This appendix describes XML comments that are used to document your program.
8 Replies
i don't believe you can mix documentation comments
you either use
include
/inheritdoc
or the other tags
(someone can correct me)I can't verify this right now but could you try using <inheritdoc cref="foo"/> in a <remarks> section of your docs comment?
Where foo is Math.Min I suppose
@Treycos it looks like exactly this is possible
you can even refine it by specifying
path="/summary
so what you'd do is:
actually you don't even need to specify the path there
coolThat would be perfect, thanks !
recommend adding breaks (
<br/>
) or a separate paragraph (<para>
) for the inherited documentation
$closeIf you have no further questions, please use /close to mark the forum thread as answered
Awesome
Works great !