3 using System
.Threading
;
6 public static void Main() {
7 Thread thr
=new Thread(new ThreadStart(foo
.thread
));
11 Console
.WriteLine("Main thread returns");
14 public static void thread() {
16 Console
.WriteLine("Thread running");
18 } catch(ThreadAbortException
) {
20 Console
.WriteLine("Abort reset!");
22 Console
.WriteLine("ThreadAbortException finally");
25 Console
.WriteLine("Thread running");
27 } catch(ThreadAbortException
) {
29 Console
.WriteLine("Abort reset!");
31 Console
.WriteLine("ThreadAbortException finally");
34 Console
.WriteLine("Thread running");
36 } catch(ThreadAbortException
) {
38 Console
.WriteLine("Abort reset!");
40 Console
.WriteLine("ThreadAbortException finally");
43 Console
.WriteLine("Thread running");
45 } catch(ThreadAbortException
) {
47 Console
.WriteLine("Abort reset!");
49 Console
.WriteLine("ThreadAbortException finally");
52 Console
.WriteLine("Thread running");
53 } catch(ThreadAbortException
) {
55 Console
.WriteLine("Abort reset!");
57 Console
.WriteLine("ThreadAbortException finally");