예제 #1
0
파일: Program.cs 프로젝트: vovoii/c-sharp
        //Main方法是整个软件程序的入口
        static void Main(string[] args)
        {
            //激活并触发事件
            new SystemEvent().EventTrigger();
            return;

            EventIntroduction e = new EventIntroduction();
            RegistedEvent     r = new RegistedEvent(e);

            e.TrigEvent(e);



            //值类型
            int x = 42;
            //引用类型
            string str = "hello world";

            Console.WriteLine("值类型:{0} \n\t 引用类型:{1}",
                              x, str);
        }
예제 #2
0
 public RegistedEvent(EventIntroduction ei)
 {
     ei.changed += E_change;
 }