thread abort (in try-catch bloc)
Hello,
in class constructor, I have
public class oneclass : System.Windows.Forms.Form
{
...
public Thread th;
...
}
on events :
public void startsomethig()
{
...
try
{
...
}
catch(Exception ef)
{
MessageBox.Show("ef content: " + ef.Message);
}
}
private void Button1_Click(object sender, System.EventArgs e)
{
th = new Thread(new ThreadStart(startsomething));
th.Start();
}
private void Button2_Click(object sender, System.EventArgs e)
{
th.Abort();
}
How do I do if I push on button2 to stop the thread
the catch above don't must intercepte stop error thread aborted. ?
Thanks in advance.
Frédéric