I have a thread in my application named "FirstThread" which is running in the background. While trying to stop this running thread using "FirstThread.Abort() " it returns an exception.Can you suggest any solutions for this
if (FirstThread.ThreadState == System.Threading.ThreadState.Running)
FirstThread.Abort();