<typeparam>(C# 编程指南)
<typeparam name="name">description</typeparam>
参数
name
类型参数的名称。 将此名称用双引号括起来 (" ")。description
类型参数的说明。
备注
在泛型类型或方法声明的注释中应该使用 <typeparam> 标记描述类型参数。 为泛型类型或方法的每个类型参数添加标记。
有关更多信息,请参见 泛型(C# 编程指南)。
<typeparam> 标记的文本将显示在 Object Browser Window代码注释 Web 报表的 IntelliSense 中。
使用 /doc 进行编译可以将文档注释处理到文件中。
示例
// compile with: /doc:DocFileName.xml
/// comment for class
public class TestClass
{
/// <summary>
/// Creates a new array of arbitrary type <typeparamref name="T"/>
/// </summary>
/// <typeparam name="T">The element type of the array</typeparam>
public static T[] mkArray<T>(int n)
{
return new T[n];
}
}