C#: is there an equivalent class of TimerTask from Java in C#?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4713818/c-is-there-an-equivalent-class-of-timertask-from-java-in-c">C#: is there an equivalent class of TimerTask from Java in C#?</a>  </p>
</blockquote>



<p>Hi,</p>

<p>I am looking if there is an equivalent class of TimerTask from Java in C#?</p>

<p>The TimerTask of Java is referenced to here: <a href="http://download.oracle.com/javase/1.4.2/docs/api/java/util/TimerTask.html" rel="nofollow">http://download.oracle.com/javase/1.4.2/docs/api/java/util/TimerTask.html</a></p>

<p>The purpose of this is that I need to implement some code following in C#:</p>

<pre><code>import java.util.Timer;
import java.util.TimerTask;

private static Timer timer = new Timer();

private TimerTask timeoutTask;

if (timeoutTime&gt;0)
{
  timeoutTask = new TimerTask() { 
    public void run() 
    {
      // callActivity();
    }
  };
}

timer.schedule( timeoutTask, timeoutTime);
</code></pre>

<p>If you could provide me an equivalent code in C#, that would be great!</p>
