什么是 C# 文档标签?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/65969/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are the C# documentation tags?
提问by Kevin Driedger
In C# documentation tags allow you to produce output similar to MSDN. What are a list of allowable tags for use inside the /// (triple slash) comment area above classes, methods, and properties?
在 C# 文档中,标签允许您生成类似于 MSDN 的输出。在类、方法和属性上方的 ///(三斜线)注释区域内使用的允许标签列表是什么?
采纳答案by David Mohundro
Check out Great documentation on the various C# XML documentation tags.(Go to the bottom to see the tags)
查看有关各种 C# XML 文档标签的优秀文档。(去底部查看标签)
回答by Ian Nelson
MSDN article from 2002 detailing all the tags and when to use them:
2002 年的 MSDN 文章详细介绍了所有标签以及何时使用它们:
回答by Jesse C. Slicer
回答by Forgotten Semicolon
回答by Joel Coehoorn
If you type this just above a method or class, intellisense should prompt you with a list of available tags:
如果您在方法或类上方键入此内容,intellisense 应提示您提供可用标签列表:
/// <
回答by Kevin Driedger
Here's a list:
这是一个列表:
- summary
- param
- returns
- example
- code
- see
- seealso
- list
- value
- file
- copyright
- 概括
- 参数
- 返回
- 例子
- 代码
- 看
- 也可以看看
- 列表
- 价值
- 文件
- 版权
Here's an example:
下面是一个例子:
<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>
回答by Scott Gowell
Look inside the docs for Sandcastle. This is the new documentation standard for .NET.
查看Sandcastle的文档。这是 .NET 的新文档标准。