System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult>.SetException Method

Marks the task as failed and binds the specified exception to the task.

Syntax

public void SetException (Exception exception)

Parameters

exception
The exception to bind to the task.

Remarks

This type and its members are intended for use by the compiler.

Requirements

Namespace: System.Runtime.CompilerServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0