Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
8
Reply
Compare 2 datatable columns and delete missing columns
Farhan Shariff
Jun 5 2014 9:07 AM
925
Reply
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
A
B
C
D
13
11
144
12
Output
table7_ref
A
B
C
D
1
2
3
4
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);
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
8
)
Next Recommended Forum
Compare ReadLine & WriteLine (Similarities and differences)
pdf to direct print