title: Removing a list of objects from another list
body: <p>I've been looking for something like that for days. I'm trying to remove all the elements from a bigger list A according to a list B.</p>
  
  <p>Suppose that I got a general list with 100 elements with differents IDS and I get another list with specific elements with just 10 records. I need remove all the elements from the first list that doesn't exists inside the second list. </p>
  
  <p>I'll try to show the code that I actually don't know how it didnt works.</p>
  
  <pre><code>List&lt;Obj&gt; listA = new List&lt;Obj&gt;(); 
  List&lt;Obj&gt; listB = new List&lt;Obj&gt;(); 
  
  //here I load my first list with many elements
  //here I load my second list with some specific elements
  
  listA.RemoveAll(x =&gt; !listB.Contains(x));
  </code></pre>
  
  <p>I don't know why but it's not working. If I try this example with a <code>List&lt;int&gt;</code> type, it works nicely but I'd like to do that with my object. This object got an ID but I don't know how to use this ID inside the LINQ sentence.</p>