Most of the winforms timer examples I have looked at declare static callbacks.
Is that irrelevant to the functionality of timers?
I removed the “static” modifier and things seem to be moving along just fine …
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.
It’s irrelevant – the methods are just used to create delegates, really. If the callbacks need to use any state from the instance (e.g. to update a particular UI element), make them instance methods. If they don’t, it’s fine for them to be static. The timer won’t care either way.