How does a List know that you changed it while enumerating it?
- 4/29/2024
- 6 minute read
Everyone falls for that and tries to change a list while enumerating it greeted by the System.InvalidOperationException: Collection was modified; enumeration operation may not execute. message. But how does the List know that you changed it? Let's find out.

