c# 判断一个string[]是否全包含另一个string[]
2018-12-17 16:21 石吴玉 阅读(2742) 评论(0) 编辑 收藏 举报// list = normalList.Except(repairList).ToList(); //差集 // list = normalList.Union(repairList).ToList(); //并集 list = normalList.Intersect(repairList).ToList(); //交集 bool result = list.All(repairList.Contains) && list.Count() == repairList.Count(); if (result) { msg = "全包含"; return true; } else { msg = "不全包含"; return false; }