Bill's and Sascha's comments inspired me to provide one of possible solutions:
DataTable dt1 = new DataTable();
DataColumn dc = new DataColumn("ID", Type.GetType("System.String"));
dt1.Columns.Add(dc);
for (int i=10; i<30; i++)
{
dt1.Rows.Add(new Object[]{string.Concat("CHARG", i.ToString())});
}
DataTable dt2 = new DataTable();
dc = new DataColumn("ID", Type.GetType("System.String"));
dt2.Columns.Add(dc);
for (int i=10; i<30; i++)
{
dt2.Rows.Add(new Object[]{string.Concat("charg", i.ToString())});
}
var qry = from r1 in dt1.AsEnumerable()
from r2 in dt2.AsEnumerable()
let comp_res = String.Equals(r1.Field<string>("ID"), r2.Field<string>("ID"), StringComparison.OrdinalIgnoreCase)
where comp_res
select new
{
r1_ID = r1.Field<string>("ID"),
r2_ID = r2.Field<string>("ID"),
comp_result = comp_res
};
qry.Dump();
Result:
r1_ID r2_ID comp_result
CHARG10 charg10 True
CHARG11 charg11 True
CHARG12 charg12 True
...
CHARG29 charg29 True
Note: it's just a sample, but it might help you to solve your issue.