_Type.GetMembers _Type.GetMembers _Type.GetMembers _Type.GetMembers Method

定義

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

多載

GetMembers() GetMembers() GetMembers() GetMembers()

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

GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags)

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

備註

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

方法會取得目前Type的成員(屬性、方法、欄位、事件等等)。 Type.GetMembersThe Type.GetMembers method gets the members (properties, methods, fields, events, and so on) of the current Type.

GetMembers() GetMembers() GetMembers() GetMembers()

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

public:
 cli::array <System::Reflection::MemberInfo ^> ^ GetMembers();
public System.Reflection.MemberInfo[] GetMembers ();
abstract member GetMembers : unit -> System.Reflection.MemberInfo[]
Public Function GetMembers () As MemberInfo()

傳回

MemberInfo 物件的陣列,代表目前 Type 的所有公用成員。An array of MemberInfo objects representing all the public members of the current Type.

-或--or- MemberInfo 類型的空陣列 (如果目前 Type 沒有公用成員)。An empty array of type MemberInfo, if the current Type does not have public members.

備註

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

方法會傳回目前Type的所有公用成員。 Type.GetMembersThe Type.GetMembers method returns all the public members of the current Type.

GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags)

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

public:
 cli::array <System::Reflection::MemberInfo ^> ^ GetMembers(System::Reflection::BindingFlags bindingAttr);
public System.Reflection.MemberInfo[] GetMembers (System.Reflection.BindingFlags bindingAttr);
abstract member GetMembers : System.Reflection.BindingFlags -> System.Reflection.MemberInfo[]
Public Function GetMembers (bindingAttr As BindingFlags) As MemberInfo()

參數

bindingAttr
BindingFlags BindingFlags BindingFlags BindingFlags

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

-或--or- 零,傳回 nullZero, to return null.

傳回

MemberInfo 物件的陣列,代表為目前 Type 定義之符合指定繫結條件約束的所有成員。An array of MemberInfo objects representing all members defined for the current Type that match the specified binding constraints.

-或--or- 如果沒有任何成員定義給目前的 MemberInfo,或沒有已定義的成員符合繫結條件約束,則為 Type 類型的空陣列。An empty array of type MemberInfo, if no members are defined for the current Type, or if none of the defined members match the binding constraints.

備註

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

方法會使用指定的系結條件約束, Type搜尋定義給目前的成員。 Type.GetMembersThe Type.GetMembers method searches for the members defined for the current Type, using the specified binding constraints.

適用於