using System.Collections.Generic;
using System.Threading.Tasks;
public static async Task Main()
var groups = new List<string>{ "a", "b" };
groups.ForEach(async s =>
throw new Exception($".ForEach exception");
Console.WriteLine("After .ForEach()");
foreach (var g in groups)
throw new Exception($"foreach loop exception");