Complement( ) method
- Last Updated: January 18, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
(Windows only; .NET)
Performs a bitwise complement (NOT) operation on the underlying value of the specified enumeration type and returns a new instance. You typically use this method to unset (turn off) a flag.
Return type:
System.Enum class from .NET
Access: PUBLIC STATIC
Applies to: Progress.Util.EnumHelper class
Syntax
|
- enum
- Static reference to an enumeration value, or a reference to an enumeration type instance.
Specify a static reference to an enumeration value using the following syntax:
|
Where enum-type is the type name of the enumeration and enum-member is a member name of the enumeration. For example:
|
The following example uses this method to invert flags:
|
If you want to use the returned System.Enum instance as a different
enumeration type, you must cast the instance to that specific type using the
CAST function.
For information on the System.Enum class and .NET
enumeration types, refer to the .NET class library documentation.