AddParticipant Method

Task Parallel System.Threading

Notifies the Barrier that there will be an additional participant.

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

Syntax

Visual Basic (Declaration)
Public Function AddParticipant As Long
C#
public long AddParticipant()

Return Value

The phase number of the barrier in which the new participants will first participate.

Exceptions

ExceptionCondition
System..::.InvalidOperationException Adding a participant would cause the barrier's participant count to exceed MaxValue.
System..::.InvalidOperationException The method was invoked from within a post-phase action.
System..::.ObjectDisposedExceptionThe current instance has already been disposed.

See Also