Thursday, January 8, 2009

Loop through DataSet

Just wanted to share a quick snippet of looping through a .NET DataSet

DataSet ds = new DataSet();
foreach(DataRow dr in ds.Tables[0].Rows)
{
Console.WriteLine(dr["ColName"].ToString());
}

No comments:

Post a Comment

Swidget