Exemplo n.º 1
0
        static void Main(string[] args)
        {
            EventExample myEvt = new EventExample();

            myEvt.valueChanged += new myEventHandler(myEvt_valueChanged);

            string str;
            do{
                str = Console.ReadLine();
                if(!str.Equals("exit")){
                    myEvt.Val = str;
                }
            }while(!str.Equals("exit"));
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            EventExample myEvt = new EventExample();

            myEvt.valueChanged += new myEventHandler(myEvt_valueChanged);

            string str;

            do
            {
                str = Console.ReadLine();
                if (!str.Equals("exit"))
                {
                    myEvt.Val = str;
                }
            } while (!str.Equals("exit"));
        }