C
C#•12mo 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•12mo ago
yeah, checking for overlaps is just a bitwise AND != 0 with a bonus of that result now containing just the overlapping flags
Relevant
RelevantOP•12mo ago
oh thank you 🙂
Want results from more Discord servers?
Add your server