CancellationTokenSource.CancelAfter Method (TimeSpan)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Schedules a Cancel operation on this CancellationTokenSource.
Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Syntax
Public Sub CancelAfter ( _
delay As TimeSpan _
)
public void CancelAfter(
TimeSpan delay
)
Parameters
- delay
Type: System..::.TimeSpan
The time span to wait before canceling this CancellationTokenSource.
Exceptions
Exception | Condition |
---|---|
ObjectDisposedException | The exception thrown when this CancellationTokenSource has been disposed. |
ArgumentOutOfRangeException | The exception that is thrown when delay is less than -1 or greater than Int32.MaxValue. |
Version Information
Windows Phone OS
Supported in: 8.1, 8.0