在此处使用 cref 属性时,T:
部分是什么意思?
<see cref="T:System.Windows.Form.Control"/>
和
<see cref="System.Windows.Form.Control"/>
最佳答案
当编译器在文档中生成 id 时,它本质上是对代码引用所指内容的注释。此处,T
表示所引用的名称 System.Windows.Form.Control
是一个类型,而不是命名空间或其他成员。
就其本身而言,文本 System.Windows.Form.Control
可能具有不同的含义。例如,它可以是命名空间,或者是 System.Windows.Form
对象的 Control
成员。这有助于描述它到底是什么。
您可以在 docs 中查看有关编译器使用的其他约定的更多信息。 .
其他前缀如下:
N namespace
T type: class, interface, struct, enum, delegate
F field
P property (including indexers or other indexed properties)
M method (including such special methods as constructors, operators, and so forth)
E event
! error string
关于c# - 在 cref 中使用时 "T:"是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41255399/