Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public Function Release ( _
releaseCount As Integer _
) As Integer |
| C# |
|---|
public int Release(
int releaseCount
) |
Parameters
- releaseCount
- Type: System..::.Int32
The number of times to exit the semaphore.
Return Value
The previous count of the
SemaphoreSlim.
Exceptions
| Exception | Condition |
|---|
| System..::.ArgumentOutOfRangeException | releaseCount is less
than 1. |
| System.Threading..::.SemaphoreFullException | The SemaphoreSlim has
already reached its maximum size. |
| System..::.ObjectDisposedException | The current instance has already been
disposed. |
See Also