System::Threading::CancellationToken::ThrowIfCancellationRequested method

CancellationToken::ThrowIfCancellationRequested method

Throws a OperationCanceledException if cancellation has been requested.

void System::Threading::CancellationToken::ThrowIfCancellationRequested() const

Remarks

This method provides a convenient way to check for cancellation at specific points in your code where it’s safe to throw an exception.

See Also