public static void Main()
.Handle<Exception>(ex => !(ex is TimeoutException))
.WaitAndRetry(2, _ => TimeSpan.FromSeconds(1));
retry.Execute(WrappedMethod);
public static int counter = 0;
public static void WrappedMethod()
Console.WriteLine("The wrapped method is called");
throw new TimeoutException();
throw new ArgumentException();