static void Main(string[] args) { Clocks myClock = new Clocks(); Analog c1 = new Analog(); Digital c2 = new Digital(); c1.Subscribe(myClock); c2.Subscribe(myClock); myClock.Run(); }
public void Subscribe(Clocks clocks) { clocks.onSecondChange += new SecondChangeHandler(Show); }