TryAddCount Method

Task Parallel System.Threading

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

ExceptionCondition
System..::.InvalidOperationExceptionCurrentCount is equal to MaxValue.
System..::.ObjectDisposedExceptionThe current instance has already been disposed.

See Also