3 using System
.Threading
;
8 AppDomain
.CurrentDomain
.UnhandledException
+= OnUnhandledException
;
13 static void OtherDomain ()
15 AppDomain domain
= AppDomain
.CreateDomain ("test");
16 ThreadPool
.QueueUserWorkItem (unused
=> {
17 domain
.DoCallBack (() => {
18 // This will get a ThreadAbortedException
23 AppDomain
.Unload (domain
);
26 static void OnUnhandledException (object sender
, UnhandledExceptionEventArgs e
)