/// <summary> /// Adds the or access address book. /// </summary> public void AddOrAccessAddressBook() { AddressBook addressBook = GetAddressBook(); if (addressBook == null) { Console.WriteLine("Action aborted"); return; } Outer: Console.WriteLine("******************************************"); Console.WriteLine("Welcome to the {0}'s Address Book", addressBookName.ToUpper()); Console.WriteLine("******************************************"); Console.WriteLine("1. Create A New Contact"); Console.WriteLine("2. Edit a contact"); Console.WriteLine("3. Delete a contact"); Console.WriteLine("4. Display Stored Contact"); Console.WriteLine("Press any Key to Exit!!!!!!!"); switch (Convert.ToInt32(Console.ReadLine().ToLower())) { case ADD_CONTACT: addressBook.AddContact(); break; case EDIT_CONTACT: addressBook.editContactDetails(); break; case GET_ALL_CONTACTS: addressBook.displayDetails(); break; case DELETE_CONTACT: addressBook.deleteDetails(); break; default: Console.WriteLine("\nInvalid option. Exiting address book"); return; } Console.WriteLine("\nType y to continue in same address Book or any other key to exit"); if (!(Console.ReadLine().ToLower() == "y")) { return; } else { goto Outer; } }