3 using System
.Threading
;
6 public static void Main() {
7 Thread thr
=new Thread(new ThreadStart(foo
.thread
));
10 Console
.WriteLine("Aborting child thread");
12 Console
.WriteLine("Main thread returns");
15 public static void thread() {
17 Console
.WriteLine("Thread running 1");
19 } catch(ThreadAbortException
) {
21 Console
.WriteLine("Abort reset! 1");
23 Console
.WriteLine("ThreadAbortException finally 1");
26 Console
.WriteLine("Thread running 2");
28 } catch(ThreadAbortException
) {
30 Console
.WriteLine("Abort reset! 2");
32 Console
.WriteLine("ThreadAbortException finally 2");
35 Console
.WriteLine("Thread running 3");
37 } catch(ThreadAbortException
) {
39 Console
.WriteLine("Abort reset! 3");
41 Console
.WriteLine("ThreadAbortException finally 3");
44 Console
.WriteLine("Thread running 4");
46 } catch(ThreadAbortException
) {
48 Console
.WriteLine("Abort reset! 4");
50 Console
.WriteLine("ThreadAbortException finally 4");
53 Console
.WriteLine("Thread running 5");
54 } catch(ThreadAbortException
) {
56 Console
.WriteLine("Abort reset! 5");
58 Console
.WriteLine("ThreadAbortException finally 5");