what is this code snippet doing?
ive got this code snippet from a library im trying to update, and i have no idea what its doing:
8 Replies
it seems like its somehow using a single MouseButtons enum value as an array?
Some bitwise shenanigans
i can see that but i have no idea how it works
If
MouseButtons
is an enum
, see if it has a [Flags]
attribute
Or perhaps some other, manual way of going about itohh itdoes
The principle is a bitmask, essentially
FlagsAttribute Class (System)
Indicates that an enumeration can be treated as a bit field; that is, a set of flags.
im converting this from winforms to wpf and MouseButton didnt work at all with it, ill just use a list instead of bitwise shenanigans lol ty