I'm just kind of curious on this. I wasn't sure how to test it on my own as it is a threading issue and not reliable. Consider the following example.
Code Snippet
private object LOCK = new object();
private bool _Foo;
private bool Foo
{
get
{lock(LOCK){return _Foo}}
set
{lock(LOCK){_Foo = value;}}
}
Will this code ensure that is long as I use Foo instead of _Foo I shouldn't have to worry about any concurrency issues with _Foo?
Thanks
~Justin