I\'ve got an Enum marked with the [Flags] attribute as follows:
[Flags] public enum Tag : int { None = 0, PrimaryNav = 1, HideChildPages = 2,
You can use the HasFlag Method to avoid the need for the boolean logic,
Tag Val = (Tag)9; if (Val.HasFlag(Tag.PrimaryNav)) { Console.WriteLine("Primary Nav"); } if(Val.HasFlag(Tag.HomePage)) { Console.WriteLine("Home Page"); }