FromResult()

System::Threading::Tasks::FromResult(TResult) function

Creates a task that has successfully completed with the specified result.

template<typename TResult> RTaskPtr<TResult> System::Threading::Tasks::FromResult(TResult result)

Template parameters

ParameterDescription
TResultThe type of the task’s result.

Arguments

ParameterTypeDescription
resultTResultThe result value with which to complete the task.

Return Value

A successfully completed task.

See Also