Reputation: 25
I have a list of Strings. I want to do a query like the following:
SentEmails is another list that comes from the database.
SentEmails.Where(Function(x)x.EmailSentTo = [any of the items in my original email address list]
But I'm not sure how to achieve this. Bascially I want to remove any email addresses from SentEmails that aren't in my original list.
Upvotes: 1
Views: 49
Reputation: 125650
Use Contains
extension method:
SentEmails.Where(Function(x) OriginalList.Contains(x.EmailSentTo))
Upvotes: 1