C-DEngine 5.105

TheCommonUtils..::..TaskFromResult<(Of <(<'T>)>)> Method

A portable helper function that resolves platform-specific differences in the handling of System.Threading.Tasks.Task.Result.

Namespace:  nsCDEngine.BaseClasses
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public static Task<T> TaskFromResult<T>(
	T result
)
Public Shared Function TaskFromResult(Of T) ( _
	result As T _
) As Task(Of T)
public:
generic<typename T>
static Task<T>^ TaskFromResult(
	T result
)

Type Parameters

T
Type of the completed task to return.

Parameters

result
Type: T
Result for the completed task.

Return Value

Completed task with Task.Result == result.