This documentation is archived and is not being maintained.

ThreadAbortException.ExceptionState Property

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

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

public Object ExceptionState { get; }

Property Value

Type: System.Object
An object containing application-specific information.

The object returned by this property is specified through the stateInfo parameter of the Abort method. 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.

The following code example shows how to pass information to a thread that is being aborted.

using System;
using System.Threading;

class Test
    public static void Main()
        Thread newThread  = new Thread(new ThreadStart(TestMethod));

        // Abort newThread.
        Console.WriteLine("Main aborting new thread.");
        newThread.Abort("Information from Main.");

        // Wait for the thread to terminate.
        Console.WriteLine("New thread terminated - Main exiting.");

    static void TestMethod()
                Console.WriteLine("New thread running.");
        catch(ThreadAbortException abortException)

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.