Set interval in never ending while loop without using Thread.Sleep in C#.net?
<pre><code>int i = 0;
while (i &lt; 11)
{
    Console.WriteLine(i.ToString());
    i++;
    System.Threading.Thread.Sleep(100);
    if (i &gt;10)
    {
        i = 0;
    }
}
</code></pre>

<p>You know what it does. It prints 0 to 10 unlimited times at every 100 milisecond interval.</p>

<p>I want this to be implemented in Windows Form. But <code>Thread.Sleep()</code> actually paralyze the GUI.</p>

<p>I've heard of timer but i haven't figured out good method to do this job using timer. Any help will be appreciated.</p>
