Private ReadOnly _taskMain As Task = MainAsync() '(省略) _taskMain.Wait()
Private Sub AsyncTest() Debug.WriteLine("A") DoNotDoThisAsync().Wait() Debug.WriteLine("B") End Sub Private Async Function DoNotDoThisAsync() As Task Debug.WriteLine("C") Await Task.Run(Sub() Debug.WriteLine("D") End Sub).ConfigureAwait(False) Debug.WriteLine("E") End Function