title: C# compare a list of IDs to each ID in a list of objects using LINQ
body: <p>I'm attempting to compare list of ints to a list of objects. to see if one of the IDs match the a key in each object. If it does then return true, else false.</p>
  
  <p>for example:</p>
  
  <pre><code>List&lt;int&gt; ints = new List&lt;int&gt; () { 
    1, 2, 3, 4, 5};
  
  List&lt;someObjectType&gt; objects = new List&lt;someObjectType&gt; () { 
    {1, "one"}, {6, "six"}, {45, "forty-five"} };
  
  (x =&gt; x.objects.any(a =&gt; ints.contains(x.id)));
  </code></pre>
  
  <p>However I don't know how to compare a list of ints to only one property on an object, I only know how to compare whole arrays to each other.</p>