GetEnum( ) method
- Last Updated: January 18, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Return type: Enum type
Access: PUBLIC
Applies to: Progress.Reflect.AccessMode enumeration, Progress.Reflect.DataType enumeration, Progress.Reflect.Flags enumeration, Progress.Reflect.ParameterMode enumeration, any user-defined enum type
Syntax
|
- enum-member-name
- The name of an enum member of the enum type the method is invoked on. For a flag enum type, this can be a comma-delimited list of enum members.
- value
- The underlying numeric value of an enum member of the enum type the method is invoked on. For a flag enum type, this value can represent two or more members.
The method returns an error if a name or numeric value does not correspond to a member of the enum type. The exception to this is that you can pass a value of 0 for a flag enum type even if no member has been explicitly defined for 0.
Both of the lines of code in the following example create an enum instance of type
Progress.Reflect.AccessMode and assign vAccess the
member Public :
|
Notes
- This method is available for all built-in enums, and the compiler automatically generates it for
all user-defined enums. For example, this code excerpt creates an instance of the
user-defined
Permissionflag enum and assignsvPermthe membersWriteandCreate:ENUM Permission FLAGS: DEFINE ENUM None = 0 Read = 0x01 Write = 0x02 ReadWrite = 0x03 Create = 0x04 Delete = 0x08. END ENUM.DEFINE VARIABLE vPerm AS Permission. vPerm = Permission:GetEnum("Write,Create").