private static async Task DoCalculations() { try { await Task.Factory.StartNew(() => { long elapsed = Benchmarks.FillList(_numberCount, _threadCount); Console.WriteLine($"Calculated {_numberCount} numbers in {elapsed} ms"); }); } catch (Exception e) { Console.WriteLine(e); } }