Task.FromResult<TResult> Method

May 11, 2014

Creates a Task<TResult> that's completed successfully with the specified result.

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

public static Task<TResult> FromResult<TResult>(
	TResult result
)

Type Parameters

TResult

The type of the result returned by the task.

Parameters

result
Type: TResult
The result to store into the completed task.

Return Value

Type: System.Threading.Tasks.Task<TResult>
The successfully completed task.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2014 Microsoft