TypeReflector.GetMember(String, BindingFlags) 方法

定义

使用指定绑定约束搜索指定成员。Searches for the specified member, using the specified binding constraints.

此 API 支持产品基础结构,不能在代码中直接使用。

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

参数

name
String

要搜索的成员的名称。The name of the member to search for.

bindingAttr
BindingFlags

枚举值的按位组合,这些值指定由反射操作执行的成员和类型搜索的方式。A bitwise combination of the enumeration values that specify the way in which the search for members and types is conducted by the reflection operation.

返回

MemberInfo[]

一个表示具有指定名称的公共成员的 MemberInfo 对象数组(如果找到的话);否则为空数组。An array of MemberInfo objects that represents the public members that have the specified name, if found; otherwise, an empty array.

适用于

另请参阅