Wednesday, June 10, 2015

Foreach Loop on Datatable in C#

For Each Loop on Datatable.

DataTable dt = GetTable(); // Get the data table.
foreach (DataRow row in dt.Rows) // Loop over the rows.
{
string value=row["name"].tostring();
}

No comments:

Post a Comment