/// <summary> /// x是否包含其中一個記錄 /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <returns></returns> public static bool AnyIsRight(Enum x, Enum[] y) { if (!y.HasRecord()) return false; return y.Any(y1 => (x.GetHashCode() & y1.GetHashCode()) == y1.GetHashCode()); }