Working with Threads in C#

Thread , Csharp , .net Iran
  • 9 years ago
    private void btnStop_Click(object sender, EventArgs e)
               if (MyThread.ThreadState == ThreadState.Running)

    As you can see from the above code, I want to abort the thread but when I click the btnStop then the thread is still running. What's the problem?

    Thank you

  • 9 years ago

    not the same thread

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter” - Eric Raymond