Exemple #1
0
        static void Main(string[] args)
        {
            Console.OutputEncoding = Encoding.Unicode;
            NumberInput number = new NumberInput();
            SubscriberA subA   = new SubscriberA();
            SubscriberB subB   = new SubscriberB();

            subA.Subscriber(number);
            subB.Subscriber(number);
            number.InputNumber();
        }
Exemple #2
0
 public void Subscriber(NumberInput numberInput)
 {
     numberInput.InputEvent += Square;
 }