Bitwise operations on a thread's ThreadState

Hello!
I'm just playing some with threads and now I want the possibility to pause and resume a thread. I've got a button that when clicked should check if the thread is running and then do myThread.Suspend(); and if not do myThread.Resume();
How should I do that?
Thanks in advance!
[305 byte] By [Marlun] at [2007-12-16]
# 1
Hi,

The following post by David should give you the idea on how to proceed:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=56657

Regards,
Vikram

Vikram at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# Language...
# 2
Note that Thread.Suspend and Thread.Resume have been marked as obsolete. You should use manual thread synchronization to pause & resume threads.
ChrisNahr at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# Language...