public Menu() { List <Contact> contacts; if (Program.UsePersistance) { contacts = Persist.ReadContacts(); manager = new Manager(contacts); } else { contacts = new List <Contact>(); manager = new Manager(contacts); } tasks = new Tasks(manager); }
public Menu() { List <Contact> contacts; // If persistence is enabled, get the user's contacts from a save file. if (Program.UsePersistance) { contacts = Persist.ReadContacts(); manager = new Manager(contacts); } // If persistence is not enabled, don't load the user's contacts from a save file. (start fresh) else { contacts = new List <Contact>(); manager = new Manager(contacts); } tasks = new Tasks(manager); }