Gets or sets the name of the type being referenced.
Assembly: System (in System.dll)
This property contains the name of the type unless it is an array type, in which case it is the array element type.
The name of the property may be misleading. This property contains just the type name with any array adornments or generic type arguments removed, not the base or parent type as might be expected. For example, the value for System.Collections.Generic.Dictionary`2[[System.String], [System.Collections.Generic.List`1[[System.Int32]]]] is System.Collections.Generic.Dictionary`2.
Representation of Generic Types
The information in this section is intended for CodeDom provider developers and only applies to CLS-compliant languages. The return value can contain generic types. Generic types are formatted with the name of the type followed by a grave accent ("`") followed by a count of the generic type arguments. The generic type arguments can be found in the CodeTypeReferenceCollection returned by the TypeArguments property. The values returned by and the associated TypeArguments contain the same content as the value of the type returned by reflection.
For example, a constructed Dictionary<TKey, TValue> where K is a string and V is a constructed List<T> of integers is represented by reflection as the following (with the assembly information removed):
The property for the parent CodeTypeReference returns the following:
The type argument count should be used when parsing the associated TypeArguments values. The common practice is to remove the type argument count from the generated code, but the practice is compiler specific. It is important to note that the type argument count can be found within a nested type name, in which case it is followed by a plus sign ("+").
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.