using System.Collections.Generic;
var actions = new Action<int>[] { Original, Proposed };
var numbers = new int[] { 0, 1, 2, 3 };
foreach (Action<int> action in actions)
foreach (int number in numbers)
Console.WriteLine($"{action.GetMethodInfo().Name}({number}) went fine!");
Console.WriteLine($"{action.GetMethodInfo().Name}({number}) threw an exception!");
static void Original(int value)
if (value == 1 || value > 2)
throw new ArgumentException();
static void Proposed(int value)
throw new ArgumentException();