Skip to content

Commit a6f277f

Browse files
shethaaditAdit Sheth
andauthored
Fixed bug 47299. (#47382)
Co-authored-by: Adit Sheth <[email protected]>
1 parent 6fe0b0f commit a6f277f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/csharp/language-reference/xmldoc/recommended-tags.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,11 @@ Inherit XML comments from base classes, interfaces, and similar methods. Using `
371371
- `cref`: Specify the member to inherit documentation from. Already defined tags on the current member aren't overridden by the inherited ones.
372372
- `path`: The XPath expression query that results in a node set to show. You can use this attribute to filter the tags to include or exclude from the inherited documentation.
373373

374+
> [!NOTE]
375+
> Visual Studio provides automatic inheritance of XML documentation for undocumented members that override or implement documented members. This feature displays inherited documentation in IntelliSense and Quick Info without requiring the `<inheritdoc>` tag. However, this automatic inheritance only applies within the Visual Studio IDE and doesn't affect the XML documentation file generated by the compiler.
376+
>
377+
> For public APIs in libraries that you distribute, you should explicitly use the `<inheritdoc>` tag or provide complete documentation to ensure the generated XML documentation file includes all necessary information for consumers of your library.
378+
374379
Add your XML comments in base classes or interfaces and let inheritdoc copy the comments to implementing classes. Add your XML comments to your synchronous methods and let inheritdoc copy the comments to your asynchronous versions of the same methods. If you want to copy the comments from a specific member, you use the `cref` attribute to specify the member.
375380

376381
### \<include>

0 commit comments

Comments
 (0)