AsyncTaskMethodBuilder(Of TResult).SetException Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Marks the task as failed and binds the specified exception to the task.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- exception
- Type: System.Exception
The exception to bind to the task.
| Exception | Condition |
|---|---|
| ArgumentNullException | exception is Nothing. |
| InvalidOperationException | The task has already completed. |
Show: