示例#1
0
 public static void Main()
 {
     EventExample.ListenForEvent(MyEventFunction);
     EventExample.ListenForEvent(MyEventFunction);
     EventExample.ListenForEvent(MyEventFunction);
     EventExample.ListenForEvent(MyOtherEventFunction);
     EventExample.LaunchEvent();
 }
示例#2
0
        static void Main(string[] args)
        {
            EventExample myEvt = new EventExample();
            myEvt.valueChanged += new myEventHandler(myEvt_valueChanged);
            myEvt.Val = "hello";

            NumberFunction func = Cube;
            Console.WriteLine(func(5));
        }