コード例 #1
0
 static void Main(string[] args)
 {
     Console.WriteLine("Hello World!");
     add += new DelEventHandler(India);
     add += new DelEventHandler(USA);
     add += new DelEventHandler(England);
     add.Invoke();
     Console.WriteLine("************Event Handling****************");
     EventHandling.ImplementEvent();
     Console.ReadKey();
 }
コード例 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to events demo!");
            //Events instantiation
            add += new DelEvents(India);
            add += new DelEvents(USA);
            add += new DelEvents(England);

            add.Invoke();
            Console.WriteLine("******");
            EventHandling.ImpleEvent();
        }