Exemplo n.º 1
0
        //Raise Event
        public void RaiseMyEasyEvent(int a, int b)
        {
            EasyEventArgs args = new EasyEventArgs()
            {
                leftValue = a, rightValue = b
            };
            string sender = "EasyEvent";

            EasyEventRaised.Invoke(sender, args);
        }
Exemplo n.º 2
0
 //Handle Event
 public static void HandleEasyEvent(object sender, EasyEventArgs args)
 {
     Console.WriteLine("Sum : {0}", args.leftValue + args.rightValue);
 }