TypeBuilder.GetMembers(BindingFlags) TypeBuilder.GetMembers(BindingFlags) TypeBuilder.GetMembers(BindingFlags) TypeBuilder.GetMembers(BindingFlags) Method

定义

返回此类型声明或继承的公共和非公共成员。Returns the members for the public and non-public members declared or inherited by this type.

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

参数

bindingAttr
BindingFlags BindingFlags BindingFlags BindingFlags

这必须是来自 BindingFlags 的位标志,例如 InvokeMethodNonPublic 等等。This must be a bit flag from BindingFlags, such as InvokeMethod, NonPublic, and so on.

返回

返回 MemberInfo 对象的数组,表示此类型声明或继承的公共和非公共成员。Returns an array of MemberInfo objects representing the public and non-public members declared or inherited by this type. 如果没有匹配的成员,则返回空数组。An empty array is returned if there are no matching members.

异常

不会为不完整类型实现此方法。This method is not implemented for incomplete types.

注解

使用Type.GetTypeAssembly.GetType检索类型,并对检索到的类型使用反射。Retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type.

适用于