//读取文件
StreamReader sr = new StreamReader(Application.StartupPath + "//sourcepath.txt", false);
sourcepath = sr.ReadLine().ToString();
sr.Close();
\\两个相同DATATABLE相减
System.Data.DataTable targetdt = filetoDataTable(targetpath);
System.Data.DataTable sourcedt = filetoDataTable(sourcepath);
var diff = sourcedt.AsEnumerable().Except(targetdt.AsEnumerable(), DataRowComparer.Default).CopyToDataTable();