BuildMaster SDK Reference
Version:

GetGenericArgumentsFromAncestor(System.Type type, System.Type genericTypeDefinition) Method

Returns the generic arguments from an ancestor with the specified generic type definition from the specified type, or an empty type array if the type's ancestors do not implement the specified generic type definition.

Syntax

public static System.Type[] GetGenericArgumentsFromAncestor(System.Type type, System.Type genericTypeDefinition)

Parameters

type
Type: System.Type

Type to inspect.

genericTypeDefinition
Type: System.Type

A generic type definition.

Returns

A type arguments array or an empty array.

Exceptions

System.ArgumentNullException

type is null (Nothing in Visual Basic) or genericTypeDefinition is null (Nothing in Visual Basic).

System.ArgumentException

genericTypeDefinition is not a generic type definition.