Method EnsureNotHeld EnsureNotHeld() Throws an exception if the current thread holds the lock. Declaration public void EnsureNotHeld() Exceptions Type Condition InvalidOperationException The current thread holds the lock.