Task.FromResult<TResult> method

Creates a Task that is completed successfully with the specified result.

public static Task<TResult> FromResult<TResult>(TResult result)
parameter description
TResult The type of the result returned by the task.
result The result to store into the completed task.

Return Value

The successfully completed task.

See Also