I don't think it's a problem with llbl per se.
Here's the code:
For Each Student As Student In gGlobalVars.GradeBookStudents
For Each SubjectAreaTchr As SubjectAreaTchrStudEntity In Student.StudentEntity.SubjectAreaTchrStud
If SubjectAreaTchr.SubAreaTchrIdent = -1 Then
Student.StudentEntity.SubjectAreaTchrStud.Remove(SubjectAreaTchr)
End If
Next
Next
Here's the Error:
************** Exception Text **************
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.ArrayListEnumeratorSimple.MoveNext()
at MedfordSchoolDistrict.ElementaryGradeBook.frmSubjectAreaTeacher.frmSubjectAreaTeacher_Closing(Object sender, CancelEventArgs e) in C:\Documents and Settings\dave.vorgang\My Documents\Visual Studio Projects\ElementaryTeachersDesktop\ElementaryGradeBook\frmSubjectAreaTeacher.vb:line 233
I'm guessing that it doesn't like me removing items while i'm running thru the collection.
So, how do I accomplish what I want to do?
Thanks,
Fishy