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
If you use .NET 4 or later I prefer to do this, cleaner imao:
[Flags] public enum Time { None = 0 Current = 1, Past = 2, Future = 4 } myProp = Time.Past | Time.Future; if (myProp.HasFlag(Time.Past)) { // Past is set... }