Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
Abhishek Sur21-Jul-09 2:55
professionalAbhishek Sur21-Jul-09 2:55 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
SimpleData21-Jul-09 2:58
SimpleData21-Jul-09 2:58 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
stancrm21-Jul-09 3:18
stancrm21-Jul-09 3:18 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
DoctorMick21-Jul-09 3:18
DoctorMick21-Jul-09 3:18 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
SimpleData21-Jul-09 3:19
SimpleData21-Jul-09 3:19 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
PIEBALDconsult21-Jul-09 4:13
mvePIEBALDconsult21-Jul-09 4:13 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
SimpleData21-Jul-09 4:14
SimpleData21-Jul-09 4:14 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
Abhishek Sur21-Jul-09 21:37
professionalAbhishek Sur21-Jul-09 21:37 
So on every block I think it is better to do

myTimer.Elapsed -= new ElapsedEventHandler(Method);
myTimer.Elapsed += new ElapsedEventHandler(Method);


By this way even if this block is running more than one, everytime it will remove the eventhandler and then add it. Provided, if you are unsure that this block will run more than once.

Thumbs Up | :thumbsup:


GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
SimpleData21-Jul-09 23:28
SimpleData21-Jul-09 23:28 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
Abhishek Sur22-Jul-09 21:47
professionalAbhishek Sur22-Jul-09 21:47 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
PIEBALDconsult21-Jul-09 4:11
mvePIEBALDconsult21-Jul-09 4:11 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
SimpleData21-Jul-09 4:13
SimpleData21-Jul-09 4:13 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
Luc Pattyn21-Jul-09 4:17
sitebuilderLuc Pattyn21-Jul-09 4:17 
GeneralRe: System.Timers.Timer doesn't stop with Stop() Pin
SimpleData21-Jul-09 4:19
SimpleData21-Jul-09 4:19 
QuestionDebugging unmanaged DLL called from managed C# Pin
Chesnokov Yuriy21-Jul-09 2:09
professionalChesnokov Yuriy21-Jul-09 2:09 
AnswerRe: Debugging unmanaged DLL called from managed C# Pin
stancrm21-Jul-09 3:23
stancrm21-Jul-09 3:23 
AnswerRe: Debugging unmanaged DLL called from managed C# Pin
Chesnokov Yuriy21-Jul-09 3:42
professionalChesnokov Yuriy21-Jul-09 3:42 
AnswerRe: Debugging unmanaged DLL called from managed C# Pin
Chesnokov Yuriy21-Jul-09 4:04
professionalChesnokov Yuriy21-Jul-09 4:04 
QuestionRe: Debugging unmanaged DLL called from managed C# Pin
Chesnokov Yuriy22-Jul-09 20:37
professionalChesnokov Yuriy22-Jul-09 20:37 
QuestionAcess violation exception before Main?!? Pin
Olivier Gautherot21-Jul-09 2:08
Olivier Gautherot21-Jul-09 2:08 
AnswerRe: Acess violation exception before Main?!? Pin
Olivier Gautherot21-Jul-09 2:58
Olivier Gautherot21-Jul-09 2:58 
GeneralRe: Acess violation exception before Main?!? Pin
stancrm21-Jul-09 3:01
stancrm21-Jul-09 3:01 
GeneralRe: Acess violation exception before Main?!? Pin
Olivier Gautherot21-Jul-09 3:04
Olivier Gautherot21-Jul-09 3:04 
AnswerRe: Acess violation exception before Main?!? Pin
stancrm21-Jul-09 2:59
stancrm21-Jul-09 2:59 
GeneralRe: Acess violation exception before Main?!? Pin
Olivier Gautherot21-Jul-09 3:03
Olivier Gautherot21-Jul-09 3:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.