LINQ to Objects List Difference

后端 未结 5 1050
有刺的猬
有刺的猬 2021-01-20 20:55

I have two EmailAddress generic lists, I wanted a simple way of just getting all the EmailAddress objects that are in List1 that aren\'t in List2.

I\'m thinking a le

5条回答
  •  渐次进展
    2021-01-20 21:22

            List list1 = new List();
            List list2 = new List();
            List list3 = list1.Except(list2).ToList();
    

提交回复
热议问题