C# Anyway to detect if an object is locked.
- by scope-creep
Hi,
Is their anyway to determine if a object is locked in c#. I have the unenviable position, through design where i'm reading from a queue inside a class, and I need to dump the contents into a collection in the class. But that collection is also read/write from an interface outside the class. So obviously their may be a case when the collection is being written to, as the same time i want to write to it.
I could program round it, say using delegate but it would be ugly.
Bob.