c# 拉姆达表达式实现List去重
c# 拉姆达表达式实现List去重
var list = studentlist.OrderByDescending(a => a.CreateDate).ToList(); Console.WriteLine(JsonConvert.SerializeObject(list.Where((x, i) => list.FindIndex(z => z.Id == x.Id) == i)));
c# 拉姆达表达式实现List去重
var list = studentlist.OrderByDescending(a => a.CreateDate).ToList(); Console.WriteLine(JsonConvert.SerializeObject(list.Where((x, i) => list.FindIndex(z => z.Id == x.Id) == i)));