You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, Thanks for the tutorial, and I really learn a lot from it.
Here is a sample code error I found when I am coding in Visual Studio.
Adding a TResult after task then it works well.
Modified line is Task[] => Task []
Original code is
Task[]asyncOps=(fromurlinurlsselectDownloadStringAsync(url)).ToArray();try{string[]pages=awaitTask.WhenAll(asyncOps);...}catch(Exceptionexc){foreach(Task<string>faultedinasyncOps.Where(t =>t.IsFaulted)){
… // work with faulted and faulted.Exception}}
Modified code is
Task<string>[]asyncOps=(fromurlinurlsselectDownloadStringAsync(url)).ToArray();try{string[]pages=awaitTask.WhenAll(asyncOps);...}catch(Exceptionexc){foreach(Task<string>faultedinasyncOps.Where(t =>t.IsFaulted)){
… // work with faulted and faulted.Exception}}
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: cabcc3ba-9033-c65f-8969-482a436d510b
Version Independent ID: a74714e2-d059-e33f-a8c6-591d988ef2a4
Activity