Looking at the documentation here https://msdn.microsoft.com/en-us/library/ms144202(v=vs.110).aspx, DownloadStringAsync
has return type void
, which means VS gives me an error
Cannot await 'void'
So how am I supposed to use that method?
Use DownloadStringTaskAsync which supports the async/await pattern
public Task<string> DownloadStringTaskAsync(Uri address)
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