我有INT确定集是否相等(套组成的集合)
var a = new List<IList<int>>();
var b = new List<IList<int>>();
他们每个人都具有以下数据列出的两个列表:
var a = new List<IList<int>>()
{
new List<int>() { 1, 2 },
new List<int>() { 4, 5, 6 },
};
var b = new List<IList<int>>()
{
new List<int>() { 6, 5, 4 },
new List<int>() { 2, 1 },
};
我想看待a
和b
像套集所以,在a.Equals(b),
它应该返回true。
我该如何做我的Equals方法?
谢谢!这样做不使用LINQ查询的foreach元素的
你可以做扩展方法。 – Reniuz