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

typeInfo 未實作 interfaceType

-或-

interfaceType 未參考介面。

-或-

typeInfointerfaceType 是開放式泛型型別。

-或-

interfaceType 是泛型介面,而 typeInfo 是陣列類型。

typeInfo 表示泛型型別參數。

typeInfoTypeBuilder 執行個體,尚未呼叫其 CreateType() 方法。

-或-

基底類別不支援叫用的方法。 衍生類別必須提供實作。

適用於

另請參閱