小编zhe*_* yu的帖子

What is the execution order/logic : Task.Run( async() => await someAsyncMethod(); )

When reading How to: Create Pre-Computed Tasks the example method DownloadStringAsync returns

Task.Run( async ()=> { return await new WebClient().DownloadStringTaskAsync(address)}) 
Run Code Online (Sandbox Code Playgroud)

I wonder why we need to wrap a async method in a Task.Run()? the WebClient().DownloadStringTaskAsync() method returns a Task itself.

c# asynchronous task

4
推荐指数
1
解决办法
700
查看次数

标签 统计

asynchronous ×1

c# ×1

task ×1