Thread.ResetAbort Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Thread.ResetAbort is not supported and throws PlatformNotSupportedException.
Cancels an Abort(Object) requested for the current thread.
public:
static void ResetAbort();
public static void ResetAbort ();
[System.Obsolete("Thread.ResetAbort is not supported and throws PlatformNotSupportedException.", DiagnosticId="SYSLIB0006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void ResetAbort ();
static member ResetAbort : unit -> unit
[<System.Obsolete("Thread.ResetAbort is not supported and throws PlatformNotSupportedException.", DiagnosticId="SYSLIB0006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member ResetAbort : unit -> unit
Public Shared Sub ResetAbort ()
- Attributes
Exceptions
.NET Core and .NET 5+ only: In all cases.
Abort
was not invoked on the current thread.
The caller does not have the required security permission for the current thread.
Remarks
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.