Type::GetInterfaceMap Method

Returns an interface mapping for the specified interface type.

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

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

Parameters

interfaceType
Type: System::Type
The Type of the interface of which to retrieve a mapping.

Return Value

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

ExceptionCondition
ArgumentException

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 nullptr.

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 methods 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 uses the GetInterfaceMap method to show the methods of the generic Dictionary<TKey, TValue> class that implement the methods of the generic IDictionary<TKey, TValue> interface.

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

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: