예제 #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();
        }
예제 #2
0
 public void Subscriber(NumberInput numberInput)
 {
     numberInput.InputEvent += Square;
 }