Uredi

Deli z drugimi prek


ValueTask.FromException Method

Definition

Overloads

FromException(Exception)

Creates a ValueTask that has completed with the specified exception.

FromException<TResult>(Exception)

Creates a ValueTask<TResult> that has completed with the specified exception.

FromException(Exception)

Source:
ValueTask.cs
Source:
ValueTask.cs
Source:
ValueTask.cs

Creates a ValueTask that has completed with the specified exception.

public:
 static System::Threading::Tasks::ValueTask FromException(Exception ^ exception);
public static System.Threading.Tasks.ValueTask FromException (Exception exception);
static member FromException : Exception -> System.Threading.Tasks.ValueTask
Public Shared Function FromException (exception As Exception) As ValueTask

Parameters

exception
Exception

The exception with which to complete the task.

Returns

The faulted task.

Applies to

FromException<TResult>(Exception)

Source:
ValueTask.cs
Source:
ValueTask.cs
Source:
ValueTask.cs

Creates a ValueTask<TResult> that has completed with the specified exception.

public:
generic <typename TResult>
 static System::Threading::Tasks::ValueTask<TResult> FromException(Exception ^ exception);
public static System.Threading.Tasks.ValueTask<TResult> FromException<TResult> (Exception exception);
static member FromException : Exception -> System.Threading.Tasks.ValueTask<'Result>
Public Shared Function FromException(Of TResult) (exception As Exception) As ValueTask(Of TResult)

Type Parameters

TResult

The type of the result of the returned task.

Parameters

exception
Exception

The exception with which to complete the task.

Returns

The faulted task.

Applies to