Attempts to increment the
CountdownEvent's current count by a
specified value.
Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function TryAddCount ( _
signalCount As Integer _
) As Boolean |
C# |
---|
public bool TryAddCount(
int signalCount
) |
Parameters
- signalCount
- Type: System..::.Int32
The value by which to increase CurrentCount.
Return Value
true if the increment succeeded; otherwise, false. If
CurrentCount is
already at zero this will return false.
Exceptions
Exception | Condition |
---|
System..::.ArgumentOutOfRangeException | signalCount is less
than 0. |
System..::.InvalidOperationException | The current instance is already
set. |
System..::.InvalidOperationException | CurrentCount is equal to MaxValue. |
System..::.ObjectDisposedException | The current instance has already been
disposed. |
See Also