摘要:
class ListDistinctDemo { staticvoid Main(string[] args) { List personList =new List(){ new Person(3),//重复数据 new Person(3), new Person(2), new Person(1) }; //使用匿名方法 List delegateList = personList.Distinct(new Compare( delegate(Person x, Person y) { if (null== x ||null== y) returnfalse; return x.ID == 阅读全文