我想每5分钟调用一个方法,我该怎么做呢?
public class Program
{
static void Main(string[] args)
{
Console.WriteLine("*** calling MyMethod *** ");
Console.ReadLine();
}
private MyMethod()
{
Console.WriteLine("*** Method is executed at {0} ***", DateTime.Now);
Console.ReadLine();
}
}