How would it be possible to call a method every 2 hours in C#
For example possibly make a click event occur every 2 hours
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.
Timer Timer.Tick Event
Timercomponent to your form.Tickevent.Call the method that you need to call. For example:
I assumed you are using Windows Forms.
If you are using WPF, there is
DispatcherTimerclass.