T
Tim Kelley
If I have a datatable with 1 record only, can I reference the data in the
row without a for loop? I can get to the data by using the following code,
but it would be nice if I didn't have to use the For loop.
foreach (DataRow row in dataTable.Rows)
{
string name = row["Name"].ToString();
string id = row["ID"].ToString();
}
row without a for loop? I can get to the data by using the following code,
but it would be nice if I didn't have to use the For loop.
foreach (DataRow row in dataTable.Rows)
{
string name = row["Name"].ToString();
string id = row["ID"].ToString();
}