SetResult Method

AsyncTaskMethodBuilder(Of TResult).SetResult Method

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

Marks the task as successfully completed.

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

'Declaration
Public Sub SetResult ( _
	result As TResult _
)

Parameters

result
Type: TResult
The result to use to complete the task.

ExceptionCondition
InvalidOperationException

The task has already completed.

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

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft