BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.SystemException

Thrown by the system when a call is made to .

Instances of this exception type can only be created by the system.

When a call is made to to terminate a thread, the system throws a in the target thread. is a special exception that can be caught by application code, but is rethrown at the end of the catch block unless is called. When the exception is raised, the system executes any blocks for the target thread. The finally blocks are executed even if is called. If the abort is successful, the target thread is left in the and states.

The following example demonstrates aborting a thread. The thread that receives the uses the method to cancel the abort request and continue executing.

`using System; using System.Threading; using System.Security.Permissions; public class ThreadWork { public static void DoWork() { try { for (int i=0; i<100; i++) { Console.WriteLine("Thread - working."); Thread.Sleep(100); } } catch (ThreadAbortException e) { Console.WriteLine("Thread - caught ThreadAbortException - resetting."); Thread.ResetAbort(); } Console.WriteLine("Thread - still alive and working."); Thread.Sleep(1000); Console.WriteLine("Thread - finished working."); } } class ThreadAbortTest{ public static void Main() { ThreadStart myThreadDelegate = new ThreadStart(ThreadWork.DoWork); Thread myThread = new Thread(myThreadDelegate); myThread.Start(); Thread.Sleep(100); Console.WriteLine("Main - aborting my thread."); myThread.Abort(); myThread.Join(); Console.WriteLine("Main ending."); } }`

The output is

Thread - working.

Main - aborting my thread.

Thread - caught ThreadAbortException - resetting.

Thread - still alive and working.

Thread - finished working.

Main ending.

- Property
  System.Object

  Gets an object that contains application-specific information related to the thread abort.

  A .

  This property is read-only.

  The object returned by this property is specified via the parameter of . This property returns if no object was specified, or the method with no parameters was called. The exact content and usage of this object is application-defined; it is typically used to convey information that is meaningful to the thread being aborted.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
0 System.Runtime.InteropServices.ComVisible(true)