Share via


Exit Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Releases an exclusive lock on the specified object.

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Shared Sub Exit ( _
    obj As Object _
)
public static void Exit(
    Object obj
)
public:
static void Exit(
    Object^ obj
)
static member Exit : 
        obj:Object -> unit 
public static function Exit(
    obj : Object
)

Parameters

Remarks

The calling thread must own the lock on the obj parameter. If the calling thread owns the lock on the specified object, and has made an equal number of Exit and Enter calls for the object, then the lock is released. If the calling thread has not invoked Exit as many times as Enter, the lock is not released.

.NET Framework Security

See Also

Reference

Monitor Class

System.Threading Namespace