Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TaskAwaiter.OnCompleted Method

.NET Framework 4.6 and 4.5

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

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

Namespace:  System.Runtime.CompilerServices
Assemblies:   mscorlib (in mscorlib.dll)
  System.Threading.Tasks (in System.Threading.Tasks.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 object was not properly initialized.

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

.NET Framework

Supported in: 4.6, 4.5

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft