I want to put a thread to sleep, and I don't have a sleep method.
I have using System.Threading
.
In my code i write :
Thread t = new Thread(StartPointMethod);
t.
In the Methods list there is no Sleep....
What could be the problem?
This code for sleep current thread for 20 second.
System.Threading.Thread.Sleep(20000);
Use this method in any method in your new thread that you want to sleep.
System.Threading.Thread.Sleep(500);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With