How to attach CancellationTokenSource to DownloadStringTaskAsync method and cancel the async call?

The async capabilities of WebClient predate . Net 4.5, so it supports the Task-based Asynchronous Pattern only partially. That includes having its own cancellation mechanism: the CancelAsync() method which works even with the new -TaskAsync methods.

To call this method when a CancellationToken is canceled, you can use its Register() method.

WebClient doesn't support cancellation. I recommend you use a newer type such as HttpClient.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions