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
浙公网安备 33010602011771号