Trying and Retrying in C#
I sometimes encounter a requirement where we want to execute some code and, if that method throws an exception, we want to retry executing it several times until some limit is reached. In this scenario, the thrown exception was expected at times by the application, and could be ignored. The operation was something that failed frequently enough that it was necessary sometimes to retry until it succeeded (web services calls for example may fail due to intermittent connectivity issues).
View original here:
Trying and Retrying in C#


