'Retry' mechanism with callback
Consider this example:

InvokeActionWithRetry(() =&gt; 
        { 
            Console.WriteLine("action"); 
            throw new Exception(); 
        }, 
    3);


It prints 'action' four times. That's not what I expect from the API (but is what I expected from reading the code). I'd expect the number I pass in to be the total number of invocations - not the number of retries after the first attempt.



You need to check this arguments for this method as there is a lot of scope to pass in the weird values. e.g. what if retryAttempts is a negative number? That doesn't make sense!

You also need to check action for null.