I have an IEnumerable of the following object:
public class Recipient
{
public int UserID { get; set; }
public string Name { get; set; }
}
So, I have an IEnumerable, 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.<Recipient> Recipients
If I just had an IEnumerable, it would be easy to do <Int> RecipientsRecipients.Contains(5);
But, because I'm trying to get a property of the collection, how do I use Contains in that instance?