📜  我比较器列表 c# - TypeScript 代码示例

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

代码示例1
using System.Collections.Generic;
using System.Linq;

namespace YourProject.Extensions
{
    public static class ListExtensions
    {
        public static bool SetwiseEquivalentTo(this List list, List other)
            where T: IEquatable
        {
            if (list.Except(other).Any())
                return false;
            if (other.Except(list).Any())
                return false;
            return true;
        }
    }
}