Leer en inglés Editar

Compartir a través de


ValueTask.FromResult<TResult>(TResult) Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

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

Producto Versiones
.NET 5, 6, 7, 8, 9, 10