1

Possible Duplicate:
Disjoint Union in LINQ

DUPE: Disjoint Union in LINQ

I know this is a simple collection operation,My code is:

var gone = from a in A
     where B.Contains(a) == false
     select a;

but it not work.

Community
  • 1
  • 1
prime23
  • 3,362
  • 2
  • 36
  • 52

1 Answers1

2
var gone = A.Except(B);
LukeH
  • 263,068
  • 57
  • 365
  • 409