Enums and Bit Fields [Resolved]
When you use bit fields with enumerated data types, you can use the elements in the Enum as flags. Now I know that you have to add the <Flags()> attribute to an Enum to turn this behaviour on, and there's no problems there, however, how do you find out the combination of values that has been set?
For example:
VB Code:
<Flags()> _
Enum myButtons
[Next] = 1
Back = 2
Cancel = 4
'...
End Enum
Public Sub ShowButtons(buttons as myButtons)
'...?
End Sub
'...
'Some other sub
Call ShowButtons(myButtons.Next Or myButtons.Back)
How do you get which buttons were passed so you can work on them?
Re: Enums and Bit Fields [Resolved]
Well, all of that is news to me. I know none of that, lol.