Hello
(E-Mail Removed),
Intoduce new variable, in the scope of lock, and set it to true.
Another way is to lock via Monitor.Enter and use TryEnter to check whether
lock exists
---
WBR,
Michael Nemtsev [C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
> Hi,
>
> I have the following in my com object-
>
> static public uint Time
> {
> get
> {
> lock (Channel.staticLockObject)
> {
> return Channel.time;
> }
> }
> }
>
> Sometimes though I am getting back incorrect values when using Time.
> How can I check if Channel.staticLockObject is already locked so that
> I can print a debug message?
>
> Thanks for your help,
>
> Barry.
>