using System.Threading.Tasks;
public static async Task Main()
Console.WriteLine("running:");
Console.WriteLine("completed:");
private static Task DoStuff()
catch (ArgumentException ex)
Console.WriteLine("exception: " + ex.Message);
return Task.CompletedTask;
private static async Task DoAndThrow()
Console.WriteLine("before throw2");
throw new ArgumentException("The throw");