public static void ResetAbort() { Thread currentThread = CurrentThread; if ((currentThread.ThreadState & System.Threading.ThreadState.AbortRequested) == System.Threading.ThreadState.Running) { throw new ThreadStateException(Environment.GetResourceString("ThreadState_NoAbortRequested")); } currentThread.ResetAbortNative(); currentThread.ClearAbortReason(); }