Returns a Type object that represents a generic type definition from which the current generic type can be constructed.
Assembly: mscorlib (in mscorlib.dll)
A generic type definition is a template from which other types can be constructed. For example, from the generic type definition G<T> (expressed in C# syntax; G(Of T) in Visual Basic or generic <typename T> ref class G in C++) you can construct and instantiate the type G<int> (G(Of Integer) in Visual Basic). Given a Type object representing this constructed type, the method returns the generic type definition.
If two constructed types are created from the same generic type definition, using the same type arguments, the method returns the same Type object for both types.
An array of generic types is not itself generic. In the C# code A<int> v; or the Visual Basic code Dim v() As A(Of Integer), the type of variable v is not generic. Use IsGenericType to determine whether a type is generic before calling .
For a list of the invariant conditions for terms used in generic reflection, see the IsGenericType property remarks.
The following code example creates an instance of a constructed type by using ordinary instance creation and then uses the GetType and methods to retrieve the constructed type and the generic type definition. This example uses the generic Dictionary(TKey, TValue) type; the constructed type represents a Dictionary(TKey, TValue) of Test objects with string keys.
.NET FrameworkSupported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0
.NET Framework Client ProfileSupported in: 4, 3.5 SP1
Portable Class LibrarySupported in: Portable Class Library
.NET for Windows Store appsSupported in: Windows 8
.NET for Windows Phone appsSupported in: Windows Phone 8.1, Windows Phone 8, Silverlight 8.1
Windows Phone 8.1, Windows Phone 8, 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.