Waits for the
Task to complete execution.
Namespace:
System.Threading.Tasks
Assembly:
System.Threading (in System.Threading.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public Sub Wait ( _
cancellationToken As CancellationToken _
) |
Exceptions
| Exception | Condition |
|---|
| System..::.OperationCanceledException |
The cancellationToken was canceled.
|
| System..::.AggregateException |
The Task was canceled -or- an exception was thrown during the execution of the Task.
|
| System..::.ObjectDisposedException |
The Task
has been disposed.
|
See Also