Ejemplo n.º 1
0
 private static void DeductTax(Account[] accounts)
 {
     foreach (Account acc in accounts)
     {
         ITaxable t = acc as ITaxable;
         t?.Deduct();
     }
 }
Ejemplo n.º 2
0
 private static void DeductTax(Account[] group)
 {
     foreach (var acc in group)
     {
         ITaxable t = acc as ITaxable;
         t?.Deduct();             //if(t != null) t.Deduct()
     }
 }
Ejemplo n.º 3
0
 private static void DeductAnnualTax(Account[] accounts)
 {
     foreach (Account acc in accounts)
     {
         ITaxable t = acc as ITaxable;
         t?.Deduct();             //if(t != null) t.Deduct()
     }
 }