title: Linq and Contains
body: <p>First example which works:</p>
  
  <pre><code>public class Test
  {
      public int ID;
      public string Name;
  }
  
  List&lt;int&gt; list1 = Load1();
  List&lt;Test&gt; list2 = Load2();
  
  var query = list2.Where(c =&gt; list1.Contains(c.ID));
  </code></pre>
  
  <p>Now I would like to use two lists of objects as a source and get list of objects that have this same values for member ID.</p>
  
  <pre><code>List&lt;Test&gt; list1 = Load2();
  List&lt;Test&gt; list2 = Load2();
  </code></pre>
  
  <p>Below doesn't compile:</p>
  
  <pre><code>var query = list2.Where(c =&gt; **list1.ID.Contains**(c.ID));
  </code></pre>
  
  <p>I know it is wrong but placed it here for better understanding.
  I would appreciate someone to show me the right path :-)</p>
  
  <p>Regards
  Mariusz</p>