【问题标题】:How do I put code examples in .NET XML comments?如何将代码示例放入 .NET XML 注释中?
【发布时间】:2009-08-12 21:03:09
【问题描述】:

我可以使用哪些标签将代码示例放入 .NET /// XML cmets?

【问题讨论】:

    标签: .net xml documentation comments


    【解决方案1】:

    尝试使用<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>
    

    我从here得到了上面的例子。

    【讨论】:

      【解决方案2】:

      您可以使用&lt;example&gt;&lt;code&gt; 标签。

      检查Recommended Tags for Documentation Comments

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-01-27
        • 2014-12-22
        • 2014-02-22
        • 1970-01-01
        • 1970-01-01
        • 2012-01-19
        • 1970-01-01
        • 2011-02-07
        相关资源
        最近更新 更多