标签:ase str null == tin hash 实体 over pre
List<实体类> 重复排除。重写Equals. public class TempData { public string Name { get; set; } public string Tel { get; set; } public string Address { get; set; } public override bool Equals(object obj) { TempData td = obj as TempData; if (td == null) return false; return Name == td.Name && Tel == td.Tel && Address == td.Address; } public override int GetHashCode() { return base.GetHashCode(); } } List<TempData> list; list.Distinct();
标签:ase str null == tin hash 实体 over pre
原文地址:http://www.cnblogs.com/larva/p/7222327.html