_Type.GetMember _Type.GetMember _Type.GetMember _Type.GetMember Method

定義

為 COM 物件提供與版本無關的 GetMember 方法之存取權。Provides COM objects with version-independent access to the GetMember method.

多載

GetMember(String) GetMember(String) GetMember(String) GetMember(String)

為 COM 物件提供與版本無關的 GetMember(String) 方法之存取權。Provides COM objects with version-independent access to the GetMember(String) method.

GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags)

為 COM 物件提供與版本無關的 GetMember(String, BindingFlags) 方法之存取權。Provides COM objects with version-independent access to the GetMember(String, BindingFlags) method.

GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags)

為 COM 物件提供與版本無關的 GetMember(String, MemberTypes, BindingFlags) 方法之存取權。Provides COM objects with version-independent access to the GetMember(String, MemberTypes, BindingFlags) method.

備註

這個方法會從 unmanaged 程式碼,是用於存取 managed 類別,並不會呼叫從 managed 程式碼。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetMember方法會取得目前的指定的成員TypeThe Type.GetMember method gets the specified members of the current Type.

GetMember(String) GetMember(String) GetMember(String) GetMember(String)

為 COM 物件提供與版本無關的 GetMember(String) 方法之存取權。Provides COM objects with version-independent access to the GetMember(String) method.

public:
 cli::array <System::Reflection::MemberInfo ^> ^ GetMember(System::String ^ name);
public System.Reflection.MemberInfo[] GetMember (string name);
abstract member GetMember : string -> System.Reflection.MemberInfo[]
Public Function GetMember (name As String) As MemberInfo()

參數

name
String String String String

String,包含要取得的公用成員名稱。The String containing the name of the public members to get.

傳回

MemberInfo 物件的陣列,代表具有指定之名稱的公用成員 (如有找到),否則為空陣列。An array of MemberInfo objects representing the public members with the specified name, if found; otherwise, an empty array.

備註

這個方法會從 unmanaged 程式碼,是用於存取 managed 類別,並不會呼叫從 managed 程式碼。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetMember方法會搜尋具有指定名稱的公用成員。The Type.GetMember method searches for the public members with the specified name.

GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags)

為 COM 物件提供與版本無關的 GetMember(String, BindingFlags) 方法之存取權。Provides COM objects with version-independent access to the GetMember(String, BindingFlags) method.

public:
 cli::array <System::Reflection::MemberInfo ^> ^ GetMember(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public System.Reflection.MemberInfo[] GetMember (string name, System.Reflection.BindingFlags bindingAttr);
abstract member GetMember : string * System.Reflection.BindingFlags -> System.Reflection.MemberInfo[]
Public Function GetMember (name As String, bindingAttr As BindingFlags) As MemberInfo()

參數

name
String String String String

String,包含要取得的成員名稱。The String containing the name of the members to get.

bindingAttr
BindingFlags BindingFlags BindingFlags BindingFlags

位元遮罩,由一或多個 BindingFlags 組成,而這些旗標會指定執行搜尋的方式。A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

-或--or- 零,表示傳回空陣列。Zero, to return an empty array.

傳回

MemberInfo 物件的陣列,代表具有指定之名稱的公用成員 (如有找到),否則為空陣列。An array of MemberInfo objects representing the public members with the specified name, if found; otherwise, an empty array.

備註

這個方法會從 unmanaged 程式碼,是用於存取 managed 類別,並不會呼叫從 managed 程式碼。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetMember方法會搜尋指定的成員,使用指定的繫結條件約束。The Type.GetMember method searches for the specified members, using the specified binding constraints.

GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags)

為 COM 物件提供與版本無關的 GetMember(String, MemberTypes, BindingFlags) 方法之存取權。Provides COM objects with version-independent access to the GetMember(String, MemberTypes, BindingFlags) method.

public:
 cli::array <System::Reflection::MemberInfo ^> ^ GetMember(System::String ^ name, System::Reflection::MemberTypes type, System::Reflection::BindingFlags bindingAttr);
public System.Reflection.MemberInfo[] GetMember (string name, System.Reflection.MemberTypes type, System.Reflection.BindingFlags bindingAttr);
abstract member GetMember : string * System.Reflection.MemberTypes * System.Reflection.BindingFlags -> System.Reflection.MemberInfo[]
Public Function GetMember (name As String, type As MemberTypes, bindingAttr As BindingFlags) As MemberInfo()

參數

name
String String String String

String,包含要取得的成員名稱。The String containing the name of the members to get.

type
MemberTypes MemberTypes MemberTypes MemberTypes

要進行搜尋的 MemberTypes 值。The MemberTypes value to search for.

bindingAttr
BindingFlags BindingFlags BindingFlags BindingFlags

位元遮罩,由一或多個 BindingFlags 組成,而這些旗標會指定執行搜尋的方式。A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

-或--or- 零,表示傳回空陣列。Zero, to return an empty array.

傳回

MemberInfo 物件的陣列,代表具有指定之名稱的公用成員 (如有找到),否則為空陣列。An array of MemberInfo objects representing the public members with the specified name, if found; otherwise, an empty array.

備註

這個方法會從 unmanaged 程式碼,是用於存取 managed 類別,並不會呼叫從 managed 程式碼。This method is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.GetMember方法會搜尋指定的成員,使用指定的繫結條件約束的指定的成員型別。The Type.GetMember method searches for the specified members of the specified member type, using the specified binding constraints.

適用於