EnumBuilder.GetMembers(BindingFlags) 方法
定义
返回此类型声明或继承的指定成员。Returns the specified 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 的位标志:InvokeMethod、NonPublic 等等。This must be a bit flag from BindingFlags : 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 currently supported in types that are not complete.
注解
解决方法:若要检索已完成类型的成员,请使用或检索该类型, Type.GetType Assembly.GetType 并在检索到的类型上使用反射。As a workaround, to retrieve the members of a finished type, retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type.