KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to delete some rows from DataTable, but it gives an error like this, Collection was modified; enumeration operation might not execute I use for deleting this code, foreach(DataRow dr in dtPerson.Rows){ if(dr["name"].ToString()=="Joe") dr.Delete(); } So, what is the problem and how to fix it? Which method do you advise?
Tags (comma-separated)
Save Edits
Cancel