Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
Collection was modified; enumeration operation might not exe
kalu singh rao
Nov 12 2014 12:41 AM
5.6k
Reply
I am working on in vb.net . Here i want to remove row of datatable using rowid. All is working fine but after remove row from datatable then i got a error message is
Collection was modified; enumeration operation might not execute
. I am using following code for delete row from datatable.
vb.net code:-
Dim dr As DataRow
For Each dr In dt.Rows
If dr("RowID").ToString() = dt.Rows(0)("RowID").ToString() Then
dt.Rows.Remove(dr)
End If
Next
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
create table for every user
C# open source projects