title: How can I use .Contains() to get at a property of a collection using LINQ to Objects?
body: <p>I have an IEnumerable of the following object:</p>
  
  <pre><code>public class Recipient  
  {  
      public  int UserID { get; set; }
      public  string Name { get; set; }
  }  
  </code></pre>
  
  <p>So, I have an <code>IEnumerable<code>&lt;Recipient</code>> Recipients</code>, and I'd like to do a .Contains() on Recipients.  Except, I'd like to do a .contains() on each recipients UserID, to see if my Recipients contain a particular userID.</p>
  
  <p>If I just had an <code>IEnumerable<code>&lt;Int</code>> Recipients</code>, it would be easy to do <code>Recipients.Contains(5);</code></p>
  
  <p>But, because I'm trying to get a property of the collection, how do I use Contains in that instance? </p>