Voglio chiamare un metodo ogni 5 minuti. Come posso fare questo?Chiamare un metodo ogni x minuti
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();
}
}
'System.Threading.Time r' –
o System.Timers.Timer - http://www.dotnetperls.com/timer – sinanakyazici