<see>(C# 编程指南)
更新:2007 年 11 月
<see cref="member"/>
参数
- cref = "member"
对可以通过当前编译环境进行调用的成员或字段的引用。编译器检查给定的代码元素是否存在,并将 member 传递给输出 XML 中的元素名称。应将 member 放在双引号 (" ") 中。
备注
<see> 标记使您得以从文本内指定链接。使用 <seealso> 指示文本应该放在“另请参见”节中。
使用 /doc 进行编译可以将文档注释处理到文件中。
有关使用 <see> 的示例,请参见 <summary>。
示例
下面的示例演示如何对泛型类型进行 cref 引用。
// compile with: /doc:DocFileName.xml
// the following cref shows how to specify the reference, such that,
// the compiler will resolve the reference
/// <summary cref="C{T}">
/// </summary>
class A { }
// the following cref shows another way to specify the reference,
// such that, the compiler will resolve the reference
// <summary cref="C < T >">
// the following cref shows how to hard-code the reference
/// <summary cref="T:C`1">
/// </summary>
class B { }
/// <summary cref="A">
/// </summary>
/// <typeparam name="T"></typeparam>
class C<T> { }