public async Task Run() { Stopwatch stopwatch1 = new Stopwatch(); Stopwatch stopwatch2 = new Stopwatch(); stopwatch1.Start(); Question14.Method1(); long method1Result = stopwatch1.ElapsedMilliseconds; stopwatch2.Start(); await Question14.Method2Async(); long method2Result = stopwatch2.ElapsedMilliseconds; Console.WriteLine($"Method2Async is {method1Result - method2Result}ms faster than Method1Async"); }
public async Task PartG() { await Question14.PartG(); }
public void PartF() { Question14.PartF(); }