GetInterfaces Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
When overridden in a derived class, gets all the interfaces implemented or inherited by the current Type.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public MustOverride Function GetInterfaces As Type()
public abstract Type[] GetInterfaces()
public:
virtual array<Type^>^ GetInterfaces() abstract
abstract GetInterfaces : unit -> Type[]
public abstract function GetInterfaces() : Type[]
Return Value
Type: array<System. . :: . .Type> [] () [] []
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.
Exceptions
Exception | Condition |
---|---|
TargetInvocationException | A static initializer is invoked and throws an exception. |
Remarks
The 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.