hey all,
i have a loop like the following:
foreach(DataTab le dt in DataTablesColle ction1)
{
if(dt[0][0].ToString().Con tains("somethin g")
{
//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(DataTab le dt in DataTablesColle ction1)
{
if(dt[0][0].ToString().Con tains("somethin g")
{
//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
Comment