.net - 如何将代码示例放入 .NET XML 注释中?

标签 .net xml documentation comments

我可以使用哪些标记将代码示例放入 .NET /// XML 注释中?

最佳答案

尝试使用 <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 得到上面的例子.

关于.net - 如何将代码示例放入 .NET XML 注释中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1268722/

相关文章:

java - 如何通过 JAXB 解码 XML,其中父节点和子节点名称相同

Java 转换器错误 : Could not compile stylesheet

documentation - 离开公司时记录代码

javascript - 如何使用 ngdoc 记录一个以 Angular 返回类的工厂?

c# - 带虚线的 TreeView/TreeViewItem ControlTemplates

C# MongoDB IAsyncCursor 详解

javascript - 当我使用 window.location.href 时,我的另一个函数没有调用。以下是我的 javascript 代码

.net - 在 TextBlock <span> 中调整上划线填充

c++ - 如何将 C++ 对象保存到 xml 文件中并恢复?

python - 如何使用 Intersphinx 引用特定文档中的类?