更新时间:2023-12-01 10:10:04
DataSet有Datatables,你可以将这些数据表与其他数据表进行比较。
DataSet has Datatables, you can compare those datatables with some other datatable.
ADataSet
是DataTable $ c $的超集C>。一个
数据集
可以有多个DataTable
。您需要找出哪个DataTable(在您的SQL结果集中,如果您有多个查询结果),您想要与您所讨论的DataTable进行比较。
然后你可以使用Linq来查找差异,使用除
之外。检查下面的链接,它提供了一个很好的例子,说明如何做到这一点:
使用LINQ比较数据集 [ ^ ]
ADataSet
is superset ofDataTable
. OneDataset
can have more than oneDataTable
. You need to find out which DataTable(in your SQL result set if you have more than one results of your query) you want to compare with the DataTable you have in question.
And then you can use Linq to find the differences by usingExcept
. Check the link below it provides a good example on how you can do that:
Comparing DataSets using LINQ[^]
你好,
是的。您可以在Linq中使用Except
函数来比较Abhipal建议的两个DataTable之间的差异。查看此链接以供参考:
比较两个Linq的DataTables
谢谢
Hello ,
Yes . You can useExcept
function in Linq to compare the difference between two DataTables which also suggested by Abhipal. Check this link for reference :
Compare two DataTables by Linq
thanks