I'd like to add a delay between 2 lines of code because I'm testing an updateprogress template. Ideally, the one-liner.
Thanks.
Try the Sleep method. Example:
Thread.Sleep(3000); //3 seconds
You will need to add this using directive:
using System.Threading;
to get access to the method.
The parameter you pass it is the number of milliseconds you want to suspend the current thread.
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