Attempts to transition the underlying
Task<(Of <(TResult>)>) into the
RanToCompletion
state.
Namespace:
System.Threading.Tasks
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function TrySetResult ( _
result As TResult _
) As Boolean |
C# |
---|
public bool TrySetResult(
TResult result
) |
Parameters
- result
- Type: TResult
The result value to bind to this Task<(Of <(TResult>)>).
Return Value
True if the operation was successful; otherwise, false.
Remarks
Exceptions
Exception | Condition |
---|
System..::.ObjectDisposedException | The Task was disposed. |
See Also