public static void Main()
throw new NotImplementedException();
catch (NotImplementedException ex) when (Rethrow(ex, () => Console.WriteLine("First")))
catch (Exception ex) when (Rethrow(ex, () => Console.WriteLine("Second")))
public static bool Rethrow(Exception exception, Action action)
if (exception == null) throw new ArgumentNullException(nameof(exception));
if (action == null) throw new ArgumentNullException(nameof(action));