Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个字符串列表。我想做如下查询:
SentEmails 是另一个来自数据库的列表。
SentEmails.Where(Function(x)x.EmailSentTo = [any of the items in my original email address list]
但我不确定如何实现这一目标。基本上,我想从 SentEmails 中删除不在我原始列表中的所有电子邮件地址。
使用Contains扩展方法:
Contains
SentEmails.Where(Function(x) OriginalList.Contains(x.EmailSentTo))