How to prevent my Timer from GC collecting before its callback excuted?
<p>I need to create a bunch of timer as local variable to do something like:</p>

<pre><code>void Foo()
{
    Timer t = new Timer(myTimerCallback,null,1000,Timeout.Infinite);
}
</code></pre>

<p>Unfortunately, some of them are collected by GC before them invoke myTimerCallback after 1 second. Since I have so many Timers, it's impossible to store them in private static member. And it's also hard to find a place to put GC.Keeplive(t). </p>

<p>How can I make each timer to do their thing before dying?</p>
