Description ​
Lock acquires the underlying critical section lock for the instance and increments LockCount. Calling Lock blocks other threads from accessing locked resources until Unlock is called.
Calls to Lock can be nested on the same thread, provided each call is paired with a corresponding Unlock call.