C# start a timer from another thread
<p>I have a timer which is made by main thread and now if I need to start the timer from another thread how can I do this?</p>

<p>Solved:
Here is my code:</p>

<pre><code>public delegate void MyDelegate();

if (this.InvokeRequired)
{
    BeginInvoke(new MyDelegate(delegate()
    {
        timer1.Start();
    }));
}
</code></pre>
