int i = 0;
while (i < 11)
{
Console.WriteLine(i.ToString());
i++;
System.Threading.Thread.Sleep(100);
if (i >10)
{
i = 0;
}
}
You know what it does. It prints 0 to 10 unlimited times at every 100 milisecond interval.
I want this to be implemented in Windows Form. But Thread.Sleep()
actually paralyze the GUI.
I've heard of timer but i haven't figured out good method to do this job using timer. Any help will be appreciated.