Dot-Net

如何將程式碼範例放入 .NET XML 註釋中?

  • January 25, 2018

我可以使用哪些標籤將程式碼範例放入 .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>

我從這裡得到了上面的例子。

您可以使用<example><code>標籤。

檢查文件註釋的推薦標籤

引用自:https://stackoverflow.com/questions/1268722