c# – 用于cref时的“T:”是什么?

前端之家收集整理的这篇文章主要介绍了c# – 用于cref时的“T:”是什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
T:part在这里使用cref属性意味着什么?
  1. <see cref="T:System.Windows.Form.Control"/>

  1. <see cref="System.Windows.Form.Control"/>

解决方法

它实质上是编译器在文档中生成id时代码引用所指的内容的注释.这里,T表示被引用的名称System.Windows.Form.Control是一个类型而不是命名空间或其他成员.

就其本身而言,文本System.Windows.Form.Control可能具有不同的含义.例如,它可以是命名空间,也可以是System.Windows.Form对象的Control成员.这有助于描述它到底是什么.

您可以在docs中查看编译器使用的其他约定的更多信息.

其他前缀如下:

  1. N namespace
  2. T type: class,interface,struct,enum,delegate
  3. F field
  4. P property (including indexers or other indexed properties)
  5. M method (including such special methods as constructors,operators,and so forth)
  6. E event
  7. ! error string

猜你在找的C#相关文章