If the serialization process use an enumerator on the dictionnary while it
serialize... The dictionnary.add method will crash, doesn't it ?
"Arkady Frenkel" <email@example.com> a écrit dans le message de news:
> In such cases I don't take a chance and copy object ( Dictionary in your
> case ) under Sync object ( Lock()/Monitor()... )
> before return copied object from service, so I'm calm that object will be
> returned to client without changes
> "Jon" <Jon@discussions.microsoft.com> wrote in message
>> I may be being stupid here (as I haven't tried it yet) but if I have WCF
>> Service which returns a static Dictionary<K,V> object (which I understand
>> serializable in WCF) and another thread were to modify that collection
>> it were serializing, what would happen?
>> Does the framework take care of it (e.g. snapshot the collection), or
>> I need to synchronize the addition/removal of Dictionary objects with the
>> service that returns the Dictionary to calling clients?