// Variable declaration
private TimeSpan start= new TimeSpan(16, 59, 00);
private TimeSpan end= new TimeSpan(17, 14, 59);
// Core
if ( ( DateTime.Now.TimeOfDay > start ) && ( DateTime.Now.TimeOfDay < end ) )
{
// Do something;
}
Looking at this code sample, some question pop:
private void TimerEventProcessor(Object myObject, EventArgs myEventArgs)
{
TriggerCustomEvent(MyCustomHandler, 0, myTimer.Interval);
}
private void MyCustomHandler(object state)
{
// Comparing and customer actions
}
2. Is there any other way to call "TriggerCustomEvent" just from TimeOfDay?
I'm doing my search but any suggestions would be appreciated as always !

Comment