When overridden in a derived class, gets all the interfaces implemented or inherited by the current Type.
Assembly: mscorlib (in mscorlib.dll)
Return ValueType: System.Type
An array of Type objects representing all the interfaces implemented or inherited by the current Type.
An empty array of type Type, if no interfaces are implemented or inherited by the current Type.
A static initializer is invoked and throws an exception.
The 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 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.
The following example gets the type of the specified class and displays all the interfaces that the type implements or inherits. To compile the Visual Basic example, use the following compiler commands:
vbc type_getinterfaces1.vb /r:System.Web.dll /r:System.dll
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.