Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have on requirement in my project...i.e. i have to loop two data tables ....

how can i loop using for each....

Please help...

Thanks,
Code hub.
Posted
Comments
agent_kruger 29-Dec-13 0:16am    
you want to merge 2 datatables right?
So what is the problem?

1 solution

If you have two datatable then you can loop through this table as follow

C#
DataSet ds=new DataSet();
//Now you add your table in this dataset
foreach(DataTable dt in ds.Tables)
{
//-----
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900