C#中List去掉重复数据
2021-03-09 22:29
阅读:706
标签:csharp name int arp res sharp list == set List C#中List去掉重复数据 标签:csharp name int arp res sharp list == set 原文地址:https://www.cnblogs.com/ahao214/p/12729294.html
public class User
{
public int ID { get; set; }
public int Name { get; set; }
}
result = result.Where((x, i) => result.FindIndex(n => n.ID == x.ID) == i).ToList();
评论
亲,登录后才可以留言!