Export (0) Print
Expand All
Expand Minimize

Type.GetInterfaceMap Method

Returns an interface mapping for the specified interface type.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

[<ComVisibleAttribute(true)>]
abstract GetInterfaceMap : 
        interfaceType:Type -> InterfaceMapping 
[<ComVisibleAttribute(true)>]
override GetInterfaceMap : 
        interfaceType:Type -> InterfaceMapping

Parameters

interfaceType
Type: System.Type

The interface type to retrieve a mapping for.

Return Value

Type: System.Reflection.InterfaceMapping
An object that represents the interface mapping for interfaceType.

Implements

_Type.GetInterfaceMap(Type)

ExceptionCondition
ArgumentException

interfaceType is not implemented by the current type.

-or-

The interfaceType parameter does not refer to an interface.

-or-

interfaceType is a generic interface, and the current type is an array type.

ArgumentNullException

interfaceType is a null reference (Nothing in Visual Basic).

InvalidOperationException

The current Type represents a generic type parameter; that is, IsGenericParameter is true.

NotSupportedException

The invoked method is not supported in the base class. Derived classes must provide an implementation.

The interface map denotes how an interface is mapped into the actual members on a class that implements that interface.

If the current Type represents a constructed generic type, type parameters are replaced by the appropriate type arguments in the elements of the InterfaceMapping returned by this method.

The following example calls the GetInterfaceMap method to determine how the IFormatProvider interface maps to CultureInfo methods, and how the IAppDomainSetup interface maps to AppDomainSetup properties. Note that, because the IAppDomainSetup interface defines a set of properties, the returned InterfaceMapping object includes separate MethodInfo objects for a property's get and set accessors.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft