Exemple #1
0
 public static void Main()
 {
     EventExample.ListenForEvent(MyEventFunction);
     EventExample.ListenForEvent(MyEventFunction);
     EventExample.ListenForEvent(MyEventFunction);
     EventExample.ListenForEvent(MyOtherEventFunction);
     EventExample.LaunchEvent();
 }
Exemple #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));
        }