Say I have the below enum
[Flags] enum Letters { A = 1, B = 2, C = 4, D = 8, E = 16, F = 32, AB = A | B, All = A | B | C,
If that's suitable for you it will return List of individual flags
static IEnumerable GetFlags(Enum input) { foreach (Enum value in Enum.GetValues(input.GetType())) if (input.HasFlag(value)) yield return value; } GetFlags(s).Intersect(GetFlags(p))