Release Method (Int32)
Collapse the table of content
Expand the table of content

SemaphoreSlim.Release Method (Int32)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Exits the SemaphoreSlim a specified number of times.

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

public int Release(
	int releaseCount
)

Parameters

releaseCount
Type: System.Int32
The number of times to exit the semaphore.

Return Value

Type: System.Int32
The previous count of the SemaphoreSlim.

ExceptionCondition
ObjectDisposedException

The current instance has already been disposed.

ArgumentOutOfRangeException

releaseCount is less than 1.

SemaphoreFullException

The SemaphoreSlim has already reached its maximum size.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2016 Microsoft