Jeff Gerber <jg******@tampabay.rr.com> wrote:
This test program will give a "Value cannot be null" error.
Yup - because the first time you try to enter the lock,
myPrivateDelegate is null, and you can't lock on null. Instead, create
another field:
object padlock = new object();
and always lock on that.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too