Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
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. |
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
The exception with which to complete the task.
The faulted task.
Product | Versions |
---|---|
.NET | 5, 6, 7, 8, 9, 10 |
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)
The type of the result of the returned task.
The exception with which to complete the task.
The faulted task.
Product | Versions |
---|---|
.NET | 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in