ThreadAbortException Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The exception that is thrown when a call is made to the Abort method. This class cannot be inherited.

System..::..Object
  System..::..Exception
    System..::..SystemException
      System.Threading..::..ThreadAbortException

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

[SerializableAttribute]
public sealed class ThreadAbortException : SystemException

The ThreadAbortException type exposes the following members.

  NameDescription
Public propertyInnerExceptionGets the Exception instance that caused the current exception. (Inherited from Exception.)
Public propertyMessageGets a message that describes the current exception. (Inherited from Exception.)
Public propertyStackTraceGets a string representation of the immediate frames on the call stack. (Inherited from Exception.)
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringCreates and returns a string representation of the current exception. (Inherited from Exception.)
Top

When a call is made to the Abort method to destroy a thread, the common language runtime throws a ThreadAbortException. ThreadAbortException is a special exception that can be caught, but it will automatically be raised again at the end of the catch block. When this exception is raised, the runtime executes all the finally blocks before ending the thread. Because the thread can do an unbounded computation in the finally blocks or call Thread.ResetAbort to cancel the abort, there is no guarantee that the thread will ever end. If you want to wait until the aborted thread has ended, you can call the Thread..::..Join method. Join is a blocking call that does not return until the thread actually stops executing.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: