//event handler public void WriteLogEntry(object clock, TimeInfoEventArgs ts) { Console.WriteLine("Logging into the file {0}:{1}:{2}", ts.hour, ts.minute, ts.second); }
//the method that implements the delegated functionality //it is an event handler public void TimeHasChanged(object clock, TimeInfoEventArgs ti) { Console.WriteLine("Current time is {0}:{1}:{2}", ti.hour, ti.minute, ti.second); }