I have four flags
Current = 0x1 Past = 0x2 Future = 0x4 All = 0x7
Say I receive the two flags Past and Future (setFlags(PAST
setFlags(PAST
I think what is missing is to take "all" but one
[Flags] public enum Time { None = 0, Current = 1, Past = 1 << 1, // 2, 10 binary Future = 1 << 2, // 4, 100 binary All = Current | Past | Future }
Then with the above flags enum, you can do
var notNow= Time&~Time.Current;