Exemplo n.º 1
0
 //RAISE EVENT
 public void CheckBalance(int x)
 {
     if (x > 250)
     {
         EvtArgsClass eac = new EvtArgsClass("Balance exceeds 250...");
         evt(this, eac);
         //evt(this, EventArgs.Empty); //2. MSEH: MADE US CHANGE THE SIGNATURE OF THE DELEGATE NEEDS OBJECT FROM SENDER
         //PASSING AN OBJECT
     }
 }
Exemplo n.º 2
0
 public void HandleTheEvent(object sender, EvtArgsClass e)              // MACHING LINE 68 EVENTHANDLER(ITS DEFENITION)
 {
     Console.WriteLine("ATTENTION! from " + sender + ": " + e.Message); // INSERT = CONCATENATE
 }