Brief explanation of Async/Await in .Net 4.5

前端 未结 3 763
我在风中等你
我在风中等你 2020-11-29 03:07

How does Asynchronous tasks (Async/Await) work in .Net 4.5?

Some sample code:

private async Task TestFunction()
{
  var x = await DoesSom         


        
3条回答
  •  没有蜡笔的小新
    2020-11-29 03:58

    await pauses the method until the operation completes. So the second await would get executed after the first await returns.

    For more information, see my async / await intro or the official FAQ.

提交回复
热议问题