Public Class ClassManager Inherits ClassSingleton(Of ClassManager) Implements IDisposable '(省略) Private Async Function MainAsync() As Task Dim ret As Task = Task.Run(Sub() '(省略) End Sub) Await ret.ConfigureAwait(False) End Function '(省略) End Class
Private ReadOnly _taskMain As Task = MainAsync() '(省略) _taskMain.Wait()