G
Guest
I need to delete some rows from a DataTable. I am not sure if the folllowing
code is supported:
void DeleteBlankRows(DataTable dt)
{
foreach(DataRow dr in dt.Rows)
{
if(AllFieldsEmpty(dr)) dr.Delete();
}
}
I am wondering if the deletion in middle of foreach will interferer with the
interal enumeration.
code is supported:
void DeleteBlankRows(DataTable dt)
{
foreach(DataRow dr in dt.Rows)
{
if(AllFieldsEmpty(dr)) dr.Delete();
}
}
I am wondering if the deletion in middle of foreach will interferer with the
interal enumeration.