I have two data tables in my wcf service method. I want to add all the rows of those data tables in a list using c#.
I am using foreach
loop to add all the rows of a data table. I can't figure out a way to do something like this,
foreach (DataRow dr in dt.Rows && DataRow dr1 in dt1.Rows)
{
lst.Add(
new GetData{week = dr["Week_Number"].ToString()
, Total_Created = dr["Total_Created"].ToString()
, Total_Open = **dr1**["Total_Open"].ToString()}
);
}