I have an array of timers instantiated in code, say manyTimers(25) - now I would love to add a eventhandler to all those, calling the same method. I could Imagine to add the handlers by
[code]dim i as integer
for i = 0 to manyTimers.ubound // Loop through the timers
AddHandler manyTimers(i).Action, AddressOf ManyTimerAction // Add Handler
next
[/code]
How do I know which timer fired in the method?
The Method looks as follows ATM:
Sub ManyTimerAction(sender as Timer)
//Do Something
End Sub
Personally I’d suggest your code be written in a way that its not relevant what the index is
Thats an implementation detail that could change when you revise code & then if it depends on the index your code breaks in funny ways