Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get my C# program to sleep for 50 msec?

Tags:

c#

vb.net

How do I get my C# program to sleep for 50 milliseconds?

This might seem an easy question, but I'm having a temporary brain failure moment!

like image 435
TK. Avatar asked Sep 18 '08 09:09

TK.


People also ask

How do I get to my C: drive?

In later Windows version, the C: drive is labeled as Primary Drive or Local Disk, and can be accessed by default by opening the “My Computer” folder.


1 Answers

System.Threading.Thread.Sleep(50); 

Remember though, that doing this in the main GUI thread will block your GUI from updating (it will feel "sluggish")

Just remove the ; to make it work for VB.net as well.

like image 197
Isak Savo Avatar answered Sep 19 '22 19:09

Isak Savo