如何将代码示例放在.NET XML注释中?

DLa*_*uer 8 .net xml documentation comments

我可以使用什么标签将代码示例放在.NET ///XML注释中?

Jas*_*ans 16

尝试使用<example>标签.

/// <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>
Run Code Online (Sandbox Code Playgroud)

我从这里得到了上面的例子.


CMS*_*CMS 6

您可以使用<example><code>标签.

检查文档注释推荐标签.