GenericTypeArguments Property

Type::GenericTypeArguments Property

.NET Framework (current version)
 

Gets an array of the generic type arguments for this type.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public:
property array<Type^>^ GenericTypeArguments {
	virtual array<Type^>^ get();
}

Property Value

Type: array<System::Type^>^

An array of the generic type arguments for this type.

This property gets only the generic type arguments; that is, the types that have been specified for the generic type parameters of the current type. If the current type is a generic type definition, this property returns an empty array.

System_CAPS_noteNote

If a generic type is used in a generic method or in another generic type, some of its generic type arguments might be generic type parameters of the enclosing method or type.

To get the generic type parameters of a type that represents a generic type definition, use the TypeInfo::GenericTypeParameters property. To get a TypeInfo object for the current Type object, use the IntrospectionExtensions::GetTypeInfo extension method.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft