1、if(ListA.Count == ListB.Count && ListA.Count(t => !ListB.Contains(c)) == 0)
数量相等,元素值相等即为True;与元素顺序无关;
List<int> A = new List<int> {1,2,3};
List<int> B = new List<int> {1,3,2};
A == B;
2、if (ListA.SequenceEqual(ListB))
数量相等,值相等,顺序一样时为True;
1、if(ListA.Count == ListB.Count && ListA.Count(t => !ListB.Contains(c)) == 0)
数量相等,元素值相等即为True;与元素顺序无关;
List<int> A = new List<int> {1,2,3};
List<int> B = new List<int> {1,3,2};
A == B;
2、if (ListA.SequenceEqual(ListB))
数量相等,值相等,顺序一样时为True;