Answers for "C# get all item in fierst list that exist in second list by id"

C#
0

select from list where not in other list c#

var result = peopleList2.Where(p => peopleList1.All(p2 => p2.ID != p.ID));
Posted by: Guest on August-20-2020
0

select from list where not in other list c#

var result = peopleList2.Where(p => !peopleList1.Any(p2 => p2.ID == p.ID));
Posted by: Guest on August-20-2020

Code answers related to "C# get all item in fierst list that exist in second list by id"

C# Answers by Framework

Browse Popular Code Answers by Language