Class Monitor
Provides a mechanism that synchronizes access to objects.
Inherited Members
Namespace: System.Threading
Assembly: mscorlib.dll
Syntax
public static class Monitor
Methods
Enter(object)
Acquires an exclusive lock on the specified object.
Declaration
public static void Enter(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object on which to acquire the monitor lock. |
Exit(object)
Releases an exclusive lock on the specified object.
Declaration
public static void Exit(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object on which to release the lock. |