Declaration
public static bool TryGetGenericParameters(
this Type type,
Type typeToFind,
out Type[] typeParameters
)
Summary
Determines whether the current type is, derives from, or implements the specified generic type, and determines
that type’s generic type parameters.
Parameters
this Type | type |
The current type. |
Type | typeToFind |
A generic type definition for a base type of interface, e.g. typeof(ICollection<>) or
typeof(IDictionary<,>) . |
out Type[] | typeParameters |
Receives an array containing the generic type parameters of the generic type. |
Returns
true
if the current type is, derives from or implements the specified generic type.