TaskCompletionSource<TResult>.SetResult method

Transitions the underlying task into the RanToCompletion state.

public virtual void SetResult(TResult result)
parameter description
result The result value to bind to this task.

Exceptions

exception condition
InvalidOperationException The underlying Task is already in one of the three final states: RanToCompletion, Faulted, or Canceled.

See Also