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
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

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

© 2015 Microsoft