Reputation: 1302
What tags can I use for putting code examples in .NET ///
XML comments?
Upvotes: 8
Views: 1792
Reputation: 29186
Try using the <example>
tag.
/// <example>
/// <code>
/// // create the class that does translations
/// GiveHelpTransforms ght = new GiveHelpTransforms();
/// // have it load our XML into the SourceXML property
/// ght.LoadXMLFromFile(
/// "E:\\Inetpub\\wwwroot\\GiveHelp\\GiveHelpDoc.xml");
/// </code>
/// </example>
I got the above example from here.
Upvotes: 16
Reputation: 827238
You can use the <example>
and <code>
tags.
Check the Recommended Tags for Documentation Comments.
Upvotes: 6