📅  最后修改于: 2022-03-11 14:48:34.292000             🧑  作者: Mango
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;
}
}
}