trn*_*ash 7 c# arrays list
我有两个整数列表(List<int>).它们包含相同的元素,但列表1包含不在列表2中的元素.
List<int>
如何查找列表1中哪些元素不在列表2中.
谢谢 :)
PS.郎是c#
bru*_*nde 18
你可以使用IEnumerable.Except:
IEnumerable.Except
list1.Except(list2);
Mat*_*hen 3
new HashSet<int>(l1).ExceptWith(l2);
归档时间:
15 年,4 月 前
查看次数:
906 次
最近记录: