public class bb :IEqualityComparer<entity> { #region IEqualityComparer<entity> Members public bool Equals(entity x, entity y) { if(x.date == y.date)自己写吧 throw new NotImplementedException(); } public int GetHashCode(entity obj) { throw new NotImplementedException(); } #endregion } List<entity > list = new List<entity >(); bb bc=new bb();
public class bb :IEqualityComparer<entity>
{
#region IEqualityComparer<entity> Members public bool Equals(entity x, entity y)
{
if(x.date == y.date)自己写吧
throw new NotImplementedException();
} public int GetHashCode(entity obj)
{
throw new NotImplementedException();
} #endregion
}
List<entity > list = new List<entity >(); bb bc=new bb();
list.Contains(entity,bc);