Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Thread::ResetAbort Method ()

 

Cancels an Abort requested for the current thread.

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

public:
[SecurityPermissionAttribute(SecurityAction::Demand, ControlThread = true)]
static void ResetAbort()

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

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.

SecurityPermission

for advanced operations on threads. Associated enumeration: SecurityPermissionFlag::ControlThread.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft