Skip to content

Instantly share code, notes, and snippets.

View alvinashcraft's full-sized avatar

Alvin Ashcraft alvinashcraft

View GitHub Profile
// From StackOverflow
// Ref: http://stackoverflow.com/questions/1563191/c-sharp-cleanest-way-to-write-retry-logic
public static class Retry
{
public static void Do(Action action, TimeSpan retryInterval, int retryCount = 3)
{
Do<object>(() =>
{
action();
return null;