Remove duplicate records using LINQ [duplicate]
问题 This question already has answers here : LINQ: Distinct values (7 answers) Closed 5 years ago . I want to use linq to object to remove duplicate records. I want that final list will contain unique records with the latest Date. I have the following list AId BId C(date) **1 2 24/5/2015** 3 6 24/5/2015 **1 2 23/5/2015** (Need To Remove) I want to remove record 3. Any Advise? 回答1: You can use GroupBy and then Select with OrderByDescending to order the dates. public class Item { public int Aid