コード例 #1
0
ファイル: Program.cs プロジェクト: TSteele27/CMP129
 public static void Main()
 {
     EventExample.ListenForEvent(MyEventFunction);
     EventExample.ListenForEvent(MyEventFunction);
     EventExample.ListenForEvent(MyEventFunction);
     EventExample.ListenForEvent(MyOtherEventFunction);
     EventExample.LaunchEvent();
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: qiaone/MyCSharp
        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));
        }