Disjoint Union in LINQ
-
03-07-2019 - |
Question
I have two sets (ILists) where I need all the items from the 1st list, where the item is not in the second list.
Can anyone point me to the best way of achieving this with a LINQ statement?
Solution
How about the Except
method:
var firstMinusSecond = first.Except(second);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow