Async modifier in C#

前端 未结 3 459
逝去的感伤
逝去的感伤 2021-01-01 15:10

I have the question, what is the difference between these two methods?

    async private void Button_Click_1(object sender, RoutedEventArgs e)
    {
                 


        
3条回答
  •  北荒
    北荒 (楼主)
    2021-01-01 15:31

    async by itself will not enable asynchronous (non-blocking) method invocation.
    You should use await inside the async function.

    You should read this to have a better understanding of this capability.

提交回复
热议问题