示例#1
0
 public void Withdraw(int sum)
 {
     deposit -= sum;
     if (deposit < 0)
     {
         if (AccountNegativeEvent != null)
         {
             BalanceEventArgs e = new BalanceEventArgs(deposit);
             AccountNegativeEvent(this, e);
         }
     }
 }
示例#2
0
 public static void InformNegative2(object sender, BalanceEventArgs e)
 {
     Console.WriteLine("Balance is negative2. Current amount is: {0}", e.Balance);
 }