AddParticipants Method

Task Parallel System.Threading

Notifies the Barrier that there will be additional participants.

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

Syntax

Visual Basic (Declaration)
Public Function AddParticipants ( _
	participantCount As Integer _
) As Long
C#
public long AddParticipants(
	int participantCount
)

Parameters

participantCount
Type: System..::.Int32
The number of additional participants to add to the barrier.

Return Value

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

Exceptions

ExceptionCondition
System..::.ArgumentOutOfRangeExceptionparticipantCount is less than 0.
System..::.ArgumentOutOfRangeExceptionAdding participantCount participants 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