Safely Removing DataRow In ForEach

Posted by ChloeRadshaw on Stack Overflow See other posts from Stack Overflow or by ChloeRadshaw
Published on 2010-02-26T12:43:02Z Indexed on 2010/04/19 16:13 UTC
Read the original article Hit count: 199

Filed under:

I dont understand why I cannot do the below - This should work??

foreach (DataRow dataRow in dataTable.Rows)
{
    if (true)
    {
        dataRow.Delete();
    }
}

© Stack Overflow or respective owner

Related posts about c#