RuntimeReflectionExtensions.GetRuntimeInterfaceMap(TypeInfo, Type) 方法

定義

回傳指定類型與介面的介面映射。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Reflection::InterfaceMapping GetRuntimeInterfaceMap(System::Reflection::TypeInfo ^ typeInfo, Type ^ interfaceType);
public static System.Reflection.InterfaceMapping GetRuntimeInterfaceMap(this System.Reflection.TypeInfo typeInfo, Type interfaceType);
static member GetRuntimeInterfaceMap : System.Reflection.TypeInfo * Type -> System.Reflection.InterfaceMapping
<Extension()>
Public Function GetRuntimeInterfaceMap (typeInfo As TypeInfo, interfaceType As Type) As InterfaceMapping

參數

typeInfo
TypeInfo

要取得映射的類型。

interfaceType
Type

用來擷取映射的介面。

傳回

一個代表指定介面與類型的介面映射的物件。

例外狀況

typeInfonull

-或者-

interfaceTypenull

interfaceType並非由 實作。typeInfo

-或者-

interfaceType 不指介面。

-或者-

typeInfointerfaceType 是開放式通用型。

-或者-

interfaceType 是一個通用介面,而 typeInfo 是一個陣列類型。

typeInfo 代表一個通用型態參數。

typeInfo 是一個 TypeBuilder 尚未呼叫其方法的實例 CreateType()

-或者-

所呼叫的方法在基類中不被支援。 衍生類別必須提供實作。

適用於

另請參閱