C
C#•8mo ago
Relevant

enum HasFlag

I would've thought this would return true, but it's false. How can I fix this logic to return true for any overlaps? (Colors.Red | Colors.Orange).HasKey(Colors.Red | Colors.Purple)
2 Replies
Jimmacle
Jimmacle•8mo ago
yeah, checking for overlaps is just a bitwise AND != 0 with a bonus of that result now containing just the overlapping flags
Relevant
Relevant•8mo ago
oh thank you 🙂