Type::GetInterfaceMap Method
Returns an interface mapping for the specified interface type.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Parameters
- interfaceType
- Type: System::Type
The Type of the interface of which to retrieve a mapping.
Return Value
Type: System.Reflection::InterfaceMappingAn InterfaceMapping object representing the interface mapping for interfaceType.
| Exception | Condition |
|---|---|
| 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.
Note: |
|---|
To run this example, see Building Examples That Use a Demo Method and a TextBlock Control. |
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Note: