SimonPrice33
asked on
c# foreach dr in datatable
Hi Experts
I am in a transition period from VB.Net to C# and am stuck on getting data from a data table so that I can build it into a CSV file.
What I have at the moment is
however i am getting an error the name dr does not exist in the current context.
Where should i place this please?
thanks
Simon
I am in a transition period from VB.Net to C# and am stuck on getting data from a data table so that I can build it into a CSV file.
What I have at the moment is
foreach (DataRow dr in dt.Rows );
{
EmirSB.Append(dr.item(1) + ",");
EmirSB.Append(dr.item(2) + ",");
EmirSB.Append(dr.item(3) + ",");
}
however i am getting an error the name dr does not exist in the current context.
Where should i place this please?
thanks
Simon
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER