海军资料

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2013年9月28日

摘要: 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 == 阅读全文
posted @ 2013-09-28 10:04 周海军 阅读(631) 评论(0) 推荐(0) 编辑