_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.

備註

這個方法是用來從非受控程式碼存取 managed 類別,而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

方法會取得由目前Type所實作為或繼承的特定介面。 Type.GetInterfaceThe 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

String,包含要取得的介面名稱。The String containing the name of the interface to get. 若為泛型介面,則為 mangled 名稱。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.

備註

這個方法是用來從非受控程式碼存取 managed 類別,而且不應該從 managed 程式碼呼叫。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

String,包含要取得的介面名稱。The String containing the name of the interface to get. 若為泛型介面,則為 mangled 名稱。For generic interfaces, this is the mangled name.

ignoreCase
Boolean Boolean Boolean Boolean

name 執行不區分大小寫的搜尋,則為 truetrue to perform a case-insensitive search for name.

-或--or- name 執行區分大小寫的搜尋,則為 falsefalse 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.

備註

這個方法是用來從非受控程式碼存取 managed 類別,而且不應該從 managed 程式碼呼叫。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.

適用於