How to await on async delegate

前端 未结 3 1335
伪装坚强ぢ
伪装坚强ぢ 2021-02-01 02:17

In one of MVA videos i saw next construction:

static void Main(string[] args)
{
    Action testAction = async () =>
    {
        Console.WriteLine(\"In\");
          


        
3条回答
  •  野的像风
    2021-02-01 03:00

    "Async void is for top-level event-handlers only",

    http://channel9.msdn.com/Series/Three-Essential-Tips-for-Async/Tip-1-Async-void-is-for-top-level-event-handlers-only

提交回复
热议问题