【发布时间】:2009-05-18 22:17:34
【问题描述】:
有没有办法选择一个列表中不包含在另一个列表中的项目?例如:
list1 = From t In list1 Where Not list2.Contains(t.column1)
这给了我错误:
Value of type 'Integer' cannot be converted to '<anonymous type>'
这是有道理的,因为 list2.Contains 期望与 list2 相同的类型。但是,列表类型不同。我只想根据列比较进行选择。
【问题讨论】: