Hi, the class library help says the following about the System.Timers
timer:

The event-handling method might be called even after the Stop method is
called. The event-handling method might run on one thread at the same time
that a call to the Stop method runs on another thread. This might result
in the Elapsed event being raised even after the Stop method is called. To
prevent this, use the SignalTime property to compare the time the event
was raised to the time the Stop method was called. If the event was raised
after the Stop method was called, do not process the event.

My question is: Instead of using the SignalTime property to stop
processing the Elapsed event after Stop() is called, couldn't you simply
check whether Enabled is True or False?

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to