I have two datatables
dtTable1:
Name Id Contact
Gems A1 8888880000
George A2 0000008888
dtTable2:
Col1 Col2 Col3
XXX1 YYY1 ZZZ1
XXX2 YYY2 ZZZ2
XXX3 YYY3 ZZZ3
XXX4 YYY4 ZZZ4
My required DataTable is:
Name Id Contact Col1 Col2 Col3
Gems A1 8888880000 XXX1 YYY1 ZZZ1
George A2 0000008888 XXX2 YYY2 ZZZ2
null null null XXX3 YYY3 ZZZ3
null null null XXX4 YYY4 ZZZ4
How can I do it with C#
Here you go. Might not be pretty but does the job. No matter which DataTable has more row it will add them.