What is the "T:" for when used in a cref

1.2k views Asked by At

What does the T: part mean in the use of the cref attribute here?

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

and

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

There are 1 answers

0
Jeff Mercado On

It's essentially an annotation to what the code reference is referring to when the compiler generates ids in the documentation. Here, the T indicates that the name System.Windows.Form.Control that's being referenced is a type and not a namespace or other member.

On its own, the text System.Windows.Form.Control could have different meanings. It could be a namespace for instance, or the Control member of a System.Windows.Form object. This helps describe what exactly it is.

You can see more information on the other conventions the compiler uses in the docs.

The other prefixes are as follows:

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