Type.GetInterfaceMap 方法

返回指定接口类型的接口映射。

**命名空间:**System
**程序集:**mscorlib(在 mscorlib.dll 中)

语法

声明
<ComVisibleAttribute(True)> _
Public Overridable Function GetInterfaceMap ( _
    interfaceType As Type _
) As InterfaceMapping
用法
Dim instance As Type
Dim interfaceType As Type
Dim returnValue As InterfaceMapping

returnValue = instance.GetInterfaceMap(interfaceType)
[ComVisibleAttribute(true)] 
public virtual InterfaceMapping GetInterfaceMap (
    Type interfaceType
)
[ComVisibleAttribute(true)] 
public:
virtual InterfaceMapping GetInterfaceMap (
    Type^ interfaceType
)
/** @attribute ComVisibleAttribute(true) */ 
public InterfaceMapping GetInterfaceMap (
    Type interfaceType
)
ComVisibleAttribute(true) 
public function GetInterfaceMap (
    interfaceType : Type
) : InterfaceMapping

参数

  • interfaceType
    要检索其映射的接口的 Type

返回值

表示 interfaceType 的接口映射的 InterfaceMapping 对象。

异常

异常类型 条件

ArgumentException

interfaceType 参数不引用接口。

ArgumentNullException

interfaceType 为 空引用(在 Visual Basic 中为 Nothing)。

InvalidOperationException

当前的 Type 表示泛型类型参数;即,IsGenericParametertrue

备注

接口映射表示接口是如何被映射到实现该接口的类上的实际方法。

如果当前 Type 表示构造泛型类型,类型形参将被替换为此方法返回的 InterfaceMapping 的元素中的相应类型实参。

平台

Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

Type 类
Type 成员
System 命名空间
InterfaceMapping