22

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?

Chris S
  • 64,770
  • 52
  • 221
  • 239

1 Answers1

37

How about the Except method:

var firstMinusSecond = first.Except(second);
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194