public void Visit(VisitorElement element) { var employee = element as Employee; // Provide 3 extra vacation days Log.WriteLine("{0} {1}'s new vacation days: {2}", employee.GetType().Name, employee.Name, employee.VacationDays); }
public void Visit(VisitorElement element) { var employee = element as Employee; // Provide 10% pay raise employee.Income *= 1.10; Log.WriteLine("{0} {1}'s new income: {2:C}", employee.GetType().Name, employee.Name, employee.Income); }