如何检查 List<List<int>>
中是否包含一个 List<int>
,最好的方法是什么?
List<List<int>> test = new List<List<int>>();
List<int> a = new List<int>{1,2,3,4,5,6};
List<int> b = new List<int>{1,2,3,4,5,6};
test.Add(a);
Debug.Log(test.Contains(b));
我知道Contains()
不会检查List<T>
的内容,因此我正在寻找确定等效性的另一种方法。