Background: In C# WinForm, I use several Threads like this
private Thread Thread1;
Thread1 = new Thread(new ThreadStart(DoSomething));
Thread1.Start();
And I want to set a timer to Stop/Kill the Thread1 every hour, and restart a new Thread1 like this:
Abort/Kill Thread1;
Thread1 = new Thread(new ThreadStart(DoSomething));
Thread1.Start();
So How to kill the thread1 and restart a new one without Restart my Winform?
Thank you kindly for your reply. I much appreciated it