Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在vb.net中使用lamba获取数据表差异_Vb.net_Lambda - Fatal编程技术网

在vb.net中使用lamba获取数据表差异

在vb.net中使用lamba获取数据表差异,vb.net,lambda,Vb.net,Lambda,使用VB.NET和lambda,我试图检索第一个数据表(table01)中不在第二个数据表(table02)中的所有记录。但却无法实现这一目标: Dim newList = table01.AsEnumerable().Where(Function(x) Not table02.AsEnumerable().Any(Function(x1) x1.Field("CustomerNumber") = x.Field("CustomerNumber") AndAlso x1.Field("Custo

使用VB.NET和lambda,我试图检索第一个数据表(table01)中不在第二个数据表(table02)中的所有记录。但却无法实现这一目标:

Dim newList = table01.AsEnumerable().Where(Function(x) Not table02.AsEnumerable().Any(Function(x1) x1.Field("CustomerNumber") = x.Field("CustomerNumber") AndAlso x1.Field("CustomerId") = x.Field("CustomerId") AndAlso x1.Field("DetailID") = x.Field("DetailID")))
错误是:

“重载解析失败,因为无法使用这些参数调用可访问的“Where”


不确定我遗漏了什么,但它不喜欢Where子句。谢谢。

您没有说明为什么“无法使其工作”,但该方法有一个您没有提供的通用参数-例如
x.Field(整数)(“CustomerId”)
(替换适当的类型)。谢谢。我已经更新了文本。错误为“重载解析失败,因为无法使用这些参数调用可访问的“Where”