I have a class A that contains a property which is is an object of handle class B. I want to implement a locking mechanism, which allows the user to instantiate class B, set it as a property of an object of class A, and then "lock" the property of object A.
Once the property is locked, changing the handle to object B should not be permitted. However with the locked handle, I should be able to access the object of class B, but not modify it.
Best Answer