Beispiel #1
0
        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();
        }
Beispiel #2
0
 public void Subscribe(Clocks clocks)
 {
     clocks.onSecondChange += new SecondChangeHandler(Show);
 }