TaskAwaiter<TResult>.GetResult Method

Definition

Ends the wait for the completion of the asynchronous task.

public:
 TResult GetResult();
public TResult GetResult ();
member this.GetResult : unit -> 'Result
Public Function GetResult () As TResult

Returns

TResult

The result of the completed task.

Exceptions

The TaskAwaiter<TResult> object was not properly initialized.

The task was canceled.

The task completed in a Faulted state.

The task was canceled.

Applies to