I want to create a util that will have a method "Call" which will get 3 arguments:
- N (int) - number of times to keep invoke the method "M" if failed .
- M ( Any type of method) he needs to invoke.
- list of arguments x will need to be invoked with.
this method "Call" should be generic that can return any type T.
so if a method Add is:
public int Add(int x,int y)
I can write
int sum = util.Call<int>(2,Add,5,4);
so method 'Add' of 5,4 will be invoked 2 times if first call throw an exception.