I\'ve got an Enum marked with the [Flags] attribute as follows:
[Flags] public enum Tag : int { None = 0, PrimaryNav = 1, HideChildPages = 2,
That's a classic Extension method:
public static bool HasFlag(this Enum val, Enum t) { return (Convert.ToUInt64(val) & Convert.ToUInt64(t)) != 0; }