ValueTask.FromResult<TResult>(TResult) Method

Definition

Creates a ValueTask<TResult> that's completed successfully with the specified result.

public static System.Threading.Tasks.ValueTask<TResult> FromResult<TResult>(TResult result);

Type Parameters

TResult

The type of the result returned by the task.

Parameters

result
TResult

The result to store into the completed task.

Returns

The successfully completed task.

Applies to

Produkt Verze
.NET 5, 6, 7, 8, 9, 10