using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NCC.Code { /// /// 转换类扩展 /// public static class ConvertExtension { /// /// 判断是否有交集 /// /// /// /// /// public static bool IsArrayIntersection(this List list1, List list2) { List t = list1.Distinct().ToList(); var exceptArr = t.Except(list2).ToList(); if (exceptArr.Count < t.Count) { return true; } else { return false; } } } }