I got it from MSDN. Only type operations are thread safe, and instance
operations are not thread safe. We have to synchronize the calls ourselves.
However, I've another question:
What's the differece between using Hashtable or implementing collections
based on DictionaryBase, in terms of performance and memory usage?
I need a collection class that can some itmes, say 10000 but should retrive
fast with its key.
"Jack" <jack@no_spam.com> wrote in message
news:eR**************@TK2MSFTNGP15.phx.gbl...
How does dotnet handles thread safety of Collections ?
I derived some classes from CollectionBase and DictionaryBase, and created
some typed Add, Remove methods to call typeless based Add, Remove methods.
Do I have to handle the locking myself ?
If one thread gets the IEnumerator, and iterate it. What happens when
another thread wanna add things to the collection ?
Thanks
Jack