You need to add the Flags attribute to the enum. You should set each value
specifically to be the value of a single bit (i.e. 1, 2, 4, 8, 16, etc...).
This way you can tell which enum flag is in a value. If you have the value
of 5 that means you have the enum values of 1 and 4.
Your example is below:
<Flags_
Public Enum Mode
Required = 1
Validate = 2
End Enum
"shapper" <md*****@gmail.comwrote in message
news:11**********************@57g2000hsv.googlegro ups.com...
Hello,
I have the following Enum
Public Enum Mode
Required
Validate
End Enum
How can I make a variable of type Mode to hold both Required and
Validate values without needing to add an option to my enum named
RequiredValidate?
And how can I check if that variable contains Required, Validate or
Required and Validate?
Is this possible?
Thanks,
Miguel