Hola:
Viendo otro tema.
Quiero que cuando detecte en consola C# cierta hora, aparezcaun mensaje HOLA.
using System; using System.Timers; using System.Windows; namespace Timer_consola_01_cs { class Program { static void Main(string[] args) { void Time() { // Crea un temporizador y establece un intervalo de medio segundo. aTimer = new Timer(); aTimer.Interval = 500; // Conecte el evento transcurrido para el temporizador. aTimer.Elapsed += OnTimedEvent; // Haga que el temporizador active eventos repetidos (verdadero es el valor predeterminado) aTimer.AutoReset = true; // Iniciar el temporizador aTimer.Enabled = true; } void OnTimedEvent(Object source, System.Timers.ElapsedEventArgs e) { MessageBox.Show(e.SignalTime.ToShortTimeString() + Environment.NewLine + e.SignalTime.ToLongTimeString()); } } } }
http://electronica-pic.blogspot.com