using System; using System.Collections.Generic; using System.Linq; [Flags] public enum TypeMoEnum : long { NotDefined = 0, MO = 1, Federal = 2, Laboratory = 4, CallCentre = 8, ForRouteCard = 16 } public class Test { private static IEnumerable With(TypeMoEnum value) { long lim = Enum.GetValues(typeof(TypeMoEnum)).OfType().Max(x => (long)x) << 1; long val = (long)value, step = val<<1; for (long l=val; l