Esempio n. 1
0
        public static void Sample3()
        {
            var v1 = new Sample3Version1();

            v1.onNewMessage +=
                (message) => Console.WriteLine(message);
            v1.SaySomething("hello1");

            var v2 = new Sample3Version2();

            v2.onNewMessage += WriteLine;
            v2.SaySomething("hello2");
        }
Esempio n. 2
0
 public static void Sample3()
 {
    
     var v1=new Sample3Version1();
     
     v1.onNewMessage += 
         (message)=>Console.WriteLine(message);
     v1.SaySomething("hello1");
     
     var v2=new Sample3Version2();
     
     v2.onNewMessage += WriteLine;
     v2.SaySomething("hello2");
     
 }