The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Task.FromResult<TResult> Method

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

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


The type of the result returned by the task.


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