private class ListDistinct : IEqualityComparer<object>
{
public bool Equals(object x, object y)
{
return x.ProductUniqueID == y.ProductUniqueID;//重复数据以...为准
}
public int GetHashCode(object obj)
{
return obj.ToString().GetHashCode();
}
}
IEnumreable.Distinct(new ListDistinct()).ToList();//过滤掉集合对象的重复数据