Represents a synchronization primitive that is signaled when its count reaches zero.
Assembly: mscorlib (in mscorlib.dll)
Initializes a new instance ofclass with the specified count.
Gets the number of remaining signals required to set the event.
Gets the numbers of signals initially required to set the event.
Indicates whether theobject's current count has reached zero..
Gets a WaitHandle that is used to wait for the event to be set.
Increments the's current count by one.
Increments the's current count by a specified value.
Releases all resources used by the current instance of theclass.
Releases the unmanaged resources used by the, and optionally releases the managed resources.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Resets the InitialCount property to a specified value.
Registers a signal with the CurrentCount., decrementing the value of
Registers multiple signals with the CurrentCount by the specified amount., decrementing the value of
Returns a string that represents the current object.(Inherited from Object.)
Attempts to increment CurrentCount by one.
Attempts to increment CurrentCount by a specified value.
Blocks the current thread until theis set.
Blocks the current thread until the CancellationToken.is set, while observing a
Blocks the current thread until theis set, using a 32-bit signed integer to measure the timeout.
Blocks the current thread until the CancellationToken.is set, using a 32-bit signed integer to measure the timeout, while observing a
Blocks the current thread until the TimeSpan to measure the timeout.is set, using a
Available since 8
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Available since 8.1
All public and protected members ofare thread-safe and may be used concurrently from multiple threads, with the exception of Dispose, which must only be used when all other operations on the have completed, and Reset, which should only be used when no other threads are accessing the event.
The following example shows how to use a: