System::Threading::CancellationToken::ThrowIfCancellationRequested metod

CancellationToken::ThrowIfCancellationRequested method

Kastar ett OperationCanceledException om avbrytning har begärts.

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

Anmärkningar

Denna metod ger ett bekvämt sätt att kontrollera avbokning på specifika ställen i din kod där det är säkert att kasta ett undantag.

Se även