Hi All, While looping through a Dataset which code snippet should I use, should I go for 2 foreach or a single for
snippet1:
for (int i = 0; i < ds.Tables["TableName"].Rows.Count; i++)
{
// My Code
}
snippet2:
foreach (DataRow dr in ds.Tables["TableName"].Rows)
{
foreach (DataColumn dc in ds.Tables["TableName"].Columns)
{
//My Code
}
}