@djork said:
@viraptor said:NameValueCollection? No - he won't be able to use that probably :(
"Public static members of this type are thread safe." - I guess, that original version had several good reasons to remove that property.I know you're joking, but I tried to come up with a reason one [i]wouldn't[/i] want code to be reentrant or thread-safe...
Nope...
There are at least two reasons for not adding full thread safety for classes. It adds complexity to the code and it adds performance overhead. If you only use a collection from a single thread, there's absolutely no need to protect it with semaphores.
Another reason is that some things are hard to make thread safe at the class level in a usage neutral way. I'm thinking of things like iterating over a collection which, depending on usage/implementation, you can't protect inside the enumerator. You have to do it in the function that is actually iterating over it.