private static async Task MainAsync() { var instance = await MyAsyncClass.CreateAsync(); Console.WriteLine($"Instance of type {instance} was created successfully."); }
public static Task <MyAsyncClass> CreateAsync() { var result = new MyAsyncClass(); return(result.InitializeAsync()); }