I have two datatables
Table7_ref
A | B | C | D | E | F | G | H | I | J |
1 | 2 | 3 | 4 | 6 | 8 | 9 | 0 | - | 8 |
Table7
Output
table7_ref
What is the mistake I am doing
for(int p=0; p<table7_ref.Columns.Count; p++)
{
string colxname = table7_ref.Columns[p].ToString();
if (!table7.Columns.Contains(colxname))
{
table7_ref.Columns.Remove(colxname);
}
}