我一直在做一个项目,该项目需要两个 csv 文件作为输入,并在 dataTable 中导入。现在我想加入这两个,最后将加入的一个显示给 dataGridView。
该程序运行良好,直到导入部分。
到目前为止,我创建的代码没有显示任何错误,但它不起作用,我的意思是,我的目标数据网格视图仍然是空白的。
请遵守以下代码并提供一些可行的解决方案。此致。
PS:我正在尝试在这里进行完全外部连接。
var tbl1 = tb1;
var tbl2 = tb2;
var res1 = from t2 in tbl2.AsEnumerable()
join t1 in tbl1.AsEnumerable() on t2["BBL"] equals t1["BBL"] into g
from t1 in g.DefaultIfEmpty()
where t1 == null
select t2;
dataGridView3.DataSource = res1;