📌  相关文章
📜  c# 如何检查两个列表是否具有相同的值 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:09.881000             🧑  作者: Mango

代码示例1
var list1 = new List { 1, 2, 3, 1 };
var list2 = new List { 2, 1, 3, 1 };
var list3 = new List { 2, 2, 3, 2 };
bool areTheSame1 = list1.SequenceEqualsIgnoreOrder(list2); //True
bool areTheSame2 = list1.SequenceEqual(list2); //True
bool areTheSame3 = list1.SequenceEqual(list3); //False