我有一个要从我的选择语句中排除的事件 ID 列表,但不知道如何实现:
这是存储我的事件 ID 列表的内容
List<int> ExcludedEvents;
这是我的选择语句(来自 XML 提要)
var allEvents = from eventsList in xmlDoc.Elements("shows").Elements("Show")
select new EventFeed()
{
EventName = eventsList.Attribute("Name").Value,
EventSummary = eventsList.Attribute("ShortDesc").Value,
EventDetails = eventsList.Attribute("LongDesc").Value,
EventShowCode = eventsList.Attribute("Code").Value
};
我想选择除 eventId 与EventShowCode值匹配的事件之外的所有事件
我看过except运算符,但不知道如何实现它