2008-09-15 49 views
32

在C#文檔標籤中,您可以生成類似於MSDN的輸出。什麼是在類,方法和屬性之上的///(三斜槓)註釋區域內使用的允許標記的列表?什麼是C#文檔標籤?

從2002年

回答

6
+7

唉,該域名已過期,這是一個斷開的鏈接。 – 2010-03-19 00:41:14

+0

那好臭 - 谷歌緩存還是有它的,但是要多長時間,誰知道呢? – 2010-03-19 02:11:15

+1

我認爲這就像JavaDocs發佈到網頁時一樣。更新鏈接在這裏:http://msdn.microsoft.com/en-us/library/b2s063f7.aspx – puretppc 2014-01-27 02:21:21

2

看到優秀的MSDN文章here作爲您的第一站。

3

GhostDoc通過爲您的方法/類創建存根評論來幫助您。

12

如果鍵入這只是上述的方法或類,智能感知應提示您提供標籤的列表:

/// < 
10

這裏有一個列表:

  • 總結
  • PARAM
  • 返回
  • 示例
  • 代碼
  • seealso
  • 列表
  • 文件
  • 版權

下面是一個例子:

 
<file> 
<copyright>(c) Extreme Designers Inc. 2008.</copyright> 
<datecreated>2008-09-15</datecreated> 
<summary> 
Here's my summary 
</summary> 
<remarks> 
<para>The <see cref="TextReader"/> can be used in the following ways:</para> 
<list type="number"> 
<item>first item</item> 
<item>second item</item> 
</list> 
</remarks> 
<example> 
<code> 
System.Console.WriteLine("Hello, World"); 
</code> 
</example> 
<param name="aParam">My first param</param> 
<returns>an object that represents a summary</returns> 
</file> 
1

查找的文檔爲的內部。這是.NET的新文檔標準。