随笔分类 -  LinQ

LINQ - DISTINCT 单列和多列两种情况下的实现
摘要:单列: List ages = new List { 21, 46, 46, 55, 17, 21, 55, 55 }; IEnumerable distinctAges = ages.Distinct(); Console.WriteLine("Distinct ages:"); foreach (int age in distinctAges) { Console.WriteLine(age); } /* ... 阅读全文

posted @ 2014-01-15 11:39 riky1989 阅读(395) 评论(0) 推荐(0)

导航