icgc 0 Newbie Poster

Hi

I have a static collection class being observed by a number of observers. The objects in the collection are updated when events occur in a 3rd party application and to which the class subscribes.

I inform the observers about any changes to the collection, or objects within the collection, by raising an event and passing the object that has changed.

I can see that I may run into threading issues with this approach because observers and the 3rd party application all have access to the same object reference.

I would be grateful for advice on how to make this pattern thread safe. Is passing the object whose properties have changed a bad idea? What would be the correct way of doing this?

Many thanks