Hi,
Why you need the timer array? If you are calling the same method and passing
the same state why not use one timer only?
Now, regarding your question, the state will persist your changes, one VERY
important thing though, the delegate will be executed in a separate thread
meaning that you have to sync. the o object, with so many timers it may be
possible that you have two thread running the delegate at the same time,
again ,try to use only one Timer
Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Paul Tomlinson" <ru************@hotmail.com> wrote in message
news:Oh****************@TK2MSFTNGP12.phx.gbl...
Question about a System.Threading.Timer object and the "state" object you
pass to it...
Timer stateTimer = new Timer( = new TimerCallback( OnTimer ), o, 1000,
1000);
I have an array of timer objects which all fire into my OnTimer( object
state ) function very nicely. I pass in an object "o" on creation of this
timer which I subsequently get passed to me in my OnTimer function. Now
in
the OnTimer function I want to modify the object "o" which I get passed
back
and then have the modified version passed to me when every subsequent
interval fires.
Is this possible?