IReflect.GetMember(String, BindingFlags) 方法

定義

擷取 MemberInfo 物件陣列,對應於所有公用成員或所有符合指定名稱的成員。Retrieves an array of MemberInfo objects corresponding to all public members or to all members that match a specified name.

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

要尋找的成員名稱。The name of the member to find.

bindingAttr
BindingFlags

繫結屬性,用來控制搜尋。The binding attributes used to control the search.

傳回

MemberInfo 物件的陣列,這些物件符合 name 參數。An array of MemberInfo objects matching the name parameter.

備註

方法會使用對應至所有MemberInfo公用成員的名稱和系結屬性, 或符合指定名稱的所有成員, 來抓取物件的陣列。 GetMemberThe GetMember method retrieves an array of MemberInfo objects by using the name and binding attribute that correspond to all public members or to all members that match a specified name. 如所指定BindingFlags.IgnoreCase, 會觀察或忽略指定名稱的大小寫。The case of the specified name is observed or ignored, as specified by BindingFlags.IgnoreCase.

適用於

另請參閱