## CancellationToken::ThrowIfCancellationRequested method


Throws a OperationCanceledException if cancellation has been requested.

```cpp
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

* Class [CancellationToken](../)
* Namespace [System::Threading](../../)
* Library [Aspose.TeX for C++](../../../)
