Application Setup
Query
Thanks
Catch the exception and check the TaskCanceledException.CancellationToken.IsCancellationRequested property. If true, you can be fairly certain that it was an explicitly requested cancellation vs. a timeout.
Having said that, be cautious with this solution and do some testing. As I discovered a while back, there are cases where you would think that bit should be set and it is not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With