System.Threading.Tasks.Task.Wait Method

Waits for the cancellable System.Threading.Tasks.Task to complete execution.

Syntax

public bool Wait (int millisecondsTimeout, System.Threading.CancellationToken cancellationToken)

Parameters

millisecondsTimeout
The number of milliseconds to wait, or System.Threading.Timeout.Infinite (-1) to wait indefinitely.
cancellationToken
A TaskFactory.CancellationToken to observe while waiting for the task to complete.

Returns

true if the System.Threading.Tasks.Task completed execution within the allotted time; otherwise, false.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System.Threading.Tasks
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0