Releases the lock.
Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public Sub Exit |
| C# |
|---|
public void Exit() |
Remarks
The default overload of Exit()()() provides the same behavior as if calling Exit(Boolean) using true as the argument.
Exceptions
| Exception | Condition |
|---|---|
| System.Threading..::.SynchronizationLockException | Thread ownership tracking is enabled, and the current thread is not the owner of this lock. |