R
rodchar
hey all,
i have a loop like the following:
foreach(DataTable dt in DataTablesCollection1)
{
if(dt[0][0].ToString().Contains("something")
{
//do something
}
}
the problem is when i get an empty datatable and it doesn't find a row at
the position in the if statement. how do you avoid something like that?
thanks,
rodchar
i have a loop like the following:
foreach(DataTable dt in DataTablesCollection1)
{
if(dt[0][0].ToString().Contains("something")
{
//do something
}
}
the problem is when i get an empty datatable and it doesn't find a row at
the position in the if statement. how do you avoid something like that?
thanks,
rodchar