예제 #1
0
파일: Program.cs 프로젝트: ssurchi/Training
        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"));
        }
예제 #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"));
        }