Ejemplo n.º 1
0
 //event handler
 public void WriteLogEntry(object clock, TimeInfoEventArgs ts)
 {
     Console.WriteLine("Logging into the file {0}:{1}:{2}", ts.hour, ts.minute, ts.second);
 }
Ejemplo n.º 2
0
 //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);
 }