I have a data table and I want to delete a row here is my code it\'s throwing me an exception
foreach (DataRow row in dt1.Rows)
{
if ((row[\"Name\"] == \
This is how I did it when I ran into this issue.
Dim index As Integer = 0
Dim count As Integer = resultsDT.Rows.Count - 1
For i As Integer = 0 To count
If resultsDT.Rows(index).Item("something") = "something" Then
resultsDT.Rows(index).Delete()
resultsDT.AcceptChanges()
index = index - 1
End If
index = index + 1
i = i + 1
Next