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的新文档标准。