views:

169

answers:

2

What tags can I use for putting code examples in .NET /// XML comments? Is this the best place to put them?

+10  A: 

Hi there.

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.

Cheers. Jas.

Jason Evans
+4  A: 

You can use the <example> and <code> tags.

Check the Recommended Tags for Documentation Comments.

CMS