Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
 IsCancellationRequested Property
Collapse All/Expand All Collapse All
.NET Framework Class Library
CancellationTokenSource..::.IsCancellationRequested Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets whether cancellation has been requested for this CancellationTokenSource.

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)
Visual Basic (Declaration)
Public ReadOnly Property IsCancellationRequested As Boolean
    Get
Visual Basic (Usage)
Dim instance As CancellationTokenSource
Dim value As Boolean

value = instance.IsCancellationRequested
C#
public bool IsCancellationRequested { get; }
Visual C++
public:
property bool IsCancellationRequested {
    bool get ();
}
F#
member IsCancellationRequested : bool

Property Value

Type: System..::.Boolean
Whether cancellation has been requested for this CancellationTokenSource.

This property indicates whether cancellation has been requested for this token source, such as due to a call to its Cancel method.

If this property returns true, it only guarantees that cancellation has been requested. It does not guarantee that every handler registered with the corresponding token has finished executing, nor that cancellation requests have finished propagating to all registered handlers. Additional synchronization may be required, particularly in situations where related objects are being canceled concurrently.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker