J
Joel Moore
Say I have an enum similar to this:
<Flags()> Enum TestFlags As Short
One = 0
Two = 1
Three = 2
Four = 4
End Enum
I figured I could declare variable of type TestFlags to be used in the
following way:
Dim test As TestFlags
test = TestFlags.One Or TestFlags.Three
However when I check the value of test it is equal to TestFlags.Three
rather than the combined value.
Additionally, if I explicitly set test = 3 (for example), I am unable to
determine which bits are set (I tried using "test = TestFlags.Two" and
"test And TestFlags.Two")
What point am I missing here?
Joel Moore
<Flags()> Enum TestFlags As Short
One = 0
Two = 1
Three = 2
Four = 4
End Enum
I figured I could declare variable of type TestFlags to be used in the
following way:
Dim test As TestFlags
test = TestFlags.One Or TestFlags.Three
However when I check the value of test it is equal to TestFlags.Three
rather than the combined value.
Additionally, if I explicitly set test = 3 (for example), I am unable to
determine which bits are set (I tried using "test = TestFlags.Two" and
"test And TestFlags.Two")
What point am I missing here?
Joel Moore