System.Type.GetInterfaces Method

When overridden in a derived class, gets all the interfaces implemented or inherited by the current Type.

Syntax

public abstract Type[] GetInterfaces ()

Returns

An array of Type objects representing all the interfaces implemented or inherited by the current Type.

-or-

An empty array of type Type, if no interfaces are implemented or inherited by the current Type.

Remarks

The Type.GetInterfaces method does not return interfaces in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which interfaces are returned, because that order varies.

If the current Type represents a constructed generic type, this method returns the Type objects with the type parameters replaced by the appropriate type arguments.

If the current Type represents a type parameter in the definition of a generic type or generic method, this method searches the interface constraints and any interfaces inherited from class or interface constraints.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0