[Mono-bugs] [Bug 561970] Exception "collection was modified" in a ReadOnlyCollection

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Apr 20 10:01:21 EDT 2010



--- Comment #6 from Andrés G. Aragoneses <knocte at gmail.com> 2010-04-20 14:01:20 UTC ---
Thanks Rodrigo, then this smells like INVALID.

That being said, why the stacktrace shows List instead of IList?
ReadOnlyCollection doesn't inherit from it.

BTW, what could be then the best approach to fix this bug? How about this?:

-foreach (var r in ro)
+foreach (var r in new List<int>(ro))

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list