Gets a value indicating whether the current Type object has type parameters that have not been replaced by specific types.
Assembly: mscorlib (in mscorlib.dll)
In order to create an instance of a type, there must be no generic type definitions or open constructed types in the type arguments of the type itself, in any enclosing generic types, or in any elements of the type. Another way of saying this is that when examined recursively, the type must contain no generic type parameters.
Since types can be arbitrarily complex, making this determination is difficult. For convenience and to reduce the chance of error, the property provides a standard way to distinguish between closed constructed types, which can be instantiated, and open constructed types, which cannot. If the property returns true, the type cannot be instantiated.
The property searches recursively for type parameters. For example, it returns true for an array whose elements are type A<T> (A(Of T) in Visual Basic), even though the array is not itself generic. Contrast this with the behavior of the IsGenericType property, which returns false for arrays.
For a set of example classes and a table showing the values of the property, see IsGenericType.
The following example defines a generic class with two type parameters and then defines a second generic class that derives from the first class. The derived class's base class has two type arguments: the first is Int32 and the second is a type parameter of the derived type. The example displays information about these generic classes, including the positions reported by the GenericParameterPosition property.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2