Tags: , , , ,

The first version of SafeList tried to address a common problem: inserting and removing elements into a List<T> while you loop over it. It had a lot of problems though and ended up being pretty much useless. Today’s article presents SafeList 2.0, a radically-improved version that really solves the problem so you can actually use it as a drop-in replacement for List<T>. Read on for the details, the source code, and even the unit tests that prove it handles all the nasty corner cases for you!

Read the rest of this article »

No Comments