Question 1:
Hi, I would like to know is there a way by which I can dispose or kill the object of DispatcherTimer and create a new object of same name?
Question 2:
Can I access the DispatcherTimer object in some other class if it is set to Public?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you don’t need the timer object any more, disable it and set reference to it to null. It will be collected later by GC.
You can disable or stop the timer by setting IsEnabled = false or call
timer.Stop(). The effect is the same.Yes. I suppose you have public property like this:
public DispatcherTimer MyTimer { get; private set; }