looping a function
I want to loop one of like, 5 functions a 100 times. I don't wanna put the loop in each of those 5 functions.
The loop code itself is the same each time, only a different function is used. I don't wanna use a if statement in the loop or a select case as that is inefficient.
I'm thinking something like having a looping class and placing the loop there, calling to an execute function - which is overridden by derived classes with those functions in them.
My thoughts are the same. Create an interface that defines a method that the loop method will call 100 times. Then create a class for each method you want to loop that implements the interface. Then just call the loop method and pass in a different class each time.