multithreading - Stop Thread on Button Click in C# - Stack ...
2016-2-5u2002·u20022. Try this: Thread thread = new Thread ( () => { Console.WriteLine ('Some actions inside thread'); }); thread.Start (); thread.Abort (); First you need to set your thread to some field and then you can control it as shown in code, Start (),Abort (). If you want Abort () thread from button click event you need to move thread field out of method ...
Get Price