예제 #1
0
파일: EnumHelper.cs 프로젝트: Dason1986/Lib
 /// <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());
 }