I am just learning how to use the XML documentation capabilities in visual studio and C#.
The default XML tags used in the documentation are "summary", "param name", and "returns".
I'd like to add "remarks" to the default tags. I'd also like to add custom tags.
I've looked through MSDN, the XML documentation tutorials, and stackoverflow and haven't found the way to do this. Any suggestions are much appreciated, and thanks!
Mark
You can add tags by updating the . vstemplate XML file. You can either use template tags that are built into Visual Studio or create custom template tags. Template tags appear only in the Visual Studio 2019 New Project dialog box.
To insert XML comments for a code element Do one of the following: Type /// in C#, or ''' in Visual Basic. From the Edit menu, choose IntelliSense > Insert Comment. From the right-click or context menu on or just above the code element, choose Snippet > Insert Comment.
The syntax for adding XML comments in your code is triple slashes /// followed by one of the supported XML tags.
This allows you to inherit documentation from base class libraries without having to add them as documentation assemblies in your project.
This thread describes a solution for VB, but says that it is not available for C#. Follow the links to vote to have this feature included in the next version of Visual Stuido.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With