var tmp = from a in DT1.AsEnumerable() join b in DT2.AsEnumerable() on new { bm = a.Field<string>("編碼"), lx = "類型" } equals new { bm = b.Field<string> ...
var tmp = from a in DT1.AsEnumerable()
join b in DT2.AsEnumerable()
on new { bm = a.Field<string>("編碼"), lx = "類型" } equals new { bm = b.Field<string>("編碼"), lx = b.Field<string>("類型") }
into ab
from c in ab.DefaultIfEmpty()
select new
{
編碼 = a.Field<string>("編碼"),
類型 = c == null ? "" : c.Field<string>("類型")
};
dt_結果 = tmp.MyCopyToDataTable();