OnCompleted Method
Collapse the table of content
Expand the table of content

TaskAwaiter<TResult>.OnCompleted Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Sets the action to perform when the TaskAwaiter<TResult> object stops waiting for the asynchronous task to complete.

Namespace:  System.Runtime.CompilerServices
Assembly:  mscorlib (in mscorlib.dll)

public void OnCompleted(
	Action continuation
)

Parameters

continuation
Type: System.Action
The action to perform when the wait operation completes.

Implements

INotifyCompletion.OnCompleted(Action)

ExceptionCondition
ArgumentNullException

continuation is null.

NullReferenceException

The TaskAwaiter<TResult> object was not properly initialized.

This type and its members are intended for use by the compiler.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft