public static void Main() { Employee employee1; Employee employee2 = new Employee(); employee2.SetName("Inigo", "Montoya"); employee2.Save(); // Modify employee2 after saving. IncreaseSalary(employee2); // Load employee1 from the saved version of employee2 employee1 = DataStorage.Load("Inigo", "Montoya"); Console.WriteLine( $"{ employee1.GetName() }: { employee1.Salary }"); }
public static void ChapterMain() { Employee employee1; Employee employee2 = new Employee(); employee2.SetName("Inigo", "Montoya"); employee2.Save(); // Modify employee2 after saving. IncreaseSalary(employee2); // Load employee1 from the saved version of employee2 employee1 = DataStorage.Load("Inigo", "Montoya"); Console.WriteLine( $"{ employee1.GetName() }: { employee1.Salary }"); }