Export (0) Print
Expand All

Thread.ResetAbort Method

Cancels an Abort requested for the current thread.

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

'Declaration
<SecurityPermissionAttribute(SecurityAction.Demand, ControlThread := True)> _
Public Shared Sub ResetAbort

ExceptionCondition
ThreadStateException

Abort was not invoked on the current thread.

SecurityException

The caller does not have the required security permission for the current thread.

This method can only be called by code with the proper permissions. For more information see Security Demands.

When a call is made to Abort to terminate a thread, the system throws a ThreadAbortException. ThreadAbortException is a special exception that can be caught by application code, but is rethrown at the end of the catch block unless ResetAbort is called. ResetAbort cancels the request to abort, and prevents the ThreadAbortException from terminating the thread.

See ThreadAbortException for an example that demonstrates calling the ResetAbort method.

.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.

Community Additions

ADD
Show:
© 2014 Microsoft