- bindingAttr
- This must be a bit flag from System.Reflection.BindingFlags, such as InvokeMethod, NonPublic, and so on.
Returns an array of System.Reflection.FieldInfo objects representing the public and non-public fields declared or inherited by this type. An empty array is returned if there are no fields, as specified.
As a workaround, to retrieve the field of a finished type, retrieve the type using Type.GetType or System.Reflection.Assembly.GetType(string) and use reflection on the retrieved type.
The EnumBuilder.GetFields(System.Reflection.BindingFlags) method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary.