.NET Framework Class Library |
CountdownEvent..::.TryAddCount Method |
CountdownEvent Class See Also Send Feedback |
Attempts to increment the CountdownEvent's current count by one.
Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function TryAddCount As Boolean |
C# |
---|
public bool TryAddCount() |
Return Value
true if the increment succeeded; otherwise, false. If CurrentCount is already at zero. this will return false.Exceptions
Exception | Condition |
---|---|
System..::.InvalidOperationException | CurrentCount is equal to MaxValue. |
System..::.ObjectDisposedException | The current instance has already been disposed. |