/// <summary> /// Compare two seats collections. /// If there is one or more seat included in both collection the result is true. /// </summary> /// <param name="group1"></param> /// <param name="group2"></param> /// <returns></returns> public static bool CompareSeates(SeatIndex[] group1, SeatIndex[] group2) { if (group1 == null || group1.Length == 0) { if (group2 == null || group2.Length == 0) return true; else return false; } if (group2 == null || group2.Length == 0) { if (group1 == null || group1.Length == 0) return true; else return false; } if (group1.Length != group2.Length) return false; foreach (var item in group1) { if (!group2.Contains(item)) return false; } return true; }