Q: If I have two DataTables like this :
Dt1(emp_num,emp_name,type)
Dt2(emp_num,emp_name,type)
I wanna to Union them and order the result by emp_name
.
var dt1 = new DataTable(); // Replace with Dt1
var dt2 = new DataTable(); // Replace with Dt2
var result = dt1.AsEnumerable()
.Union(dt2.AsEnumerable())
.OrderBy (d => d.Field<string>("emp_name"));