AsyncValueTaskMethodBuilder.SetException(Exception) 方法

定义

标记此任务为失败并将指定的异常绑定到此任务。

public:
 void SetException(Exception ^ exception);
public void SetException (Exception exception);
member this.SetException : Exception -> unit
Public Sub SetException (exception As Exception)

参数

exception
Exception

要绑定到该任务的异常。

适用于