_Type.GetInterface _Type.GetInterface _Type.GetInterface _Type.GetInterface Method

定义

为 COM 对象提供对 GetInterface 方法的版本无关的访问。Provides COM objects with version-independent access to the GetInterface method.

重载

GetInterface(String) GetInterface(String) GetInterface(String) GetInterface(String)

为 COM 对象提供对 GetInterface(String) 方法的版本无关的访问。Provides COM objects with version-independent access to the GetInterface(String) method.

GetInterface(String, Boolean) GetInterface(String, Boolean) GetInterface(String, Boolean) GetInterface(String, Boolean)

为 COM 对象提供对 GetInterface(String, Boolean) 方法的版本无关的访问。Provides COM objects with version-independent access to the GetInterface(String, Boolean) method.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetInterface方法获取特定接口实现或继承的当前TypeThe Type.GetInterface method gets a specific interface implemented or inherited by the current Type.

GetInterface(String) GetInterface(String) GetInterface(String) GetInterface(String)

为 COM 对象提供对 GetInterface(String) 方法的版本无关的访问。Provides COM objects with version-independent access to the GetInterface(String) method.

public:
 Type ^ GetInterface(System::String ^ name);
public Type GetInterface (string name);
abstract member GetInterface : string -> Type
Public Function GetInterface (name As String) As Type

参数

name
String String String String

包含要获取的接口名称的 StringThe String containing the name of the interface to get. 对于泛型接口,这是重整名称。For generic interfaces, this is the mangled name.

返回

表示具有指定名称且由当前的 Type 实现或继承的接口的 Type 对象(如果找到的话);否则为 nullA Type object representing the interface with the specified name, implemented or inherited by the current Type, if found; otherwise, null.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetInterface方法搜索具有指定名称的接口。The Type.GetInterface method searches for the interface with the specified name.

GetInterface(String, Boolean) GetInterface(String, Boolean) GetInterface(String, Boolean) GetInterface(String, Boolean)

为 COM 对象提供对 GetInterface(String, Boolean) 方法的版本无关的访问。Provides COM objects with version-independent access to the GetInterface(String, Boolean) method.

public:
 Type ^ GetInterface(System::String ^ name, bool ignoreCase);
public Type GetInterface (string name, bool ignoreCase);
abstract member GetInterface : string * bool -> Type
Public Function GetInterface (name As String, ignoreCase As Boolean) As Type

参数

name
String String String String

包含要获取的接口名称的 StringThe String containing the name of the interface to get. 对于泛型接口,这是重整名称。For generic interfaces, this is the mangled name.

ignoreCase
Boolean Boolean Boolean Boolean

true,表示对 name 执行不区分大小写的搜索。true to perform a case-insensitive search for name.

- 或 --or- false,表示对 name 执行区分大小写的搜索。false to perform a case-sensitive search for name.

返回

表示具有指定名称且由当前的 Type 实现或继承的接口的 Type 对象(如果找到的话);否则为 nullA Type object representing the interface with the specified name, implemented or inherited by the current Type, if found; otherwise, null.

注解

此方法用于访问托管类到从非托管代码,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetInterface方法搜索指定的接口,指定是否执行区分大小写的搜索。The Type.GetInterface method searches for the specified interface, specifying whether to do a case-sensitive search.

适用于