示例#1
0
        /// <summary>
        /// Defines the entry point of the application.
        /// </summary>
        /// <param name="args">The arguments.</param>
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Address Book Problem.");
            MultipleAddressBook book = new MultipleAddressBook();

            book.BookMenu();
        }
示例#2
0
        /// <summary>
        /// Addresses the book menu.
        /// </summary>
        public void ContactMenu()
        {
            int loop = 1;
            MultipleAddressBook multipleAddressBook = new MultipleAddressBook();

            while (loop == 1)
            {
                Console.WriteLine("\nEnter Your Choice");
                Console.WriteLine("\n1. Add Contact. \n2. Display \n3. Edit Contact. \n4. Delete Contact. \n5. To addressbook menu." +
                                  " \n6. Exit.");
                int choice = Convert.ToInt32(Console.ReadLine());
                switch (choice)
                {
                case 1:
                    AddContact();
                    break;

                case 2:
                    DisplayContact();
                    break;

                case 3:
                    EditContact();
                    break;

                case 4:
                    DeleteContact();
                    break;

                case 5:
                    multipleAddressBook.BookMenu();
                    break;

                case 6:
                    Environment.Exit(0);
                    break;

                default:
                    Console.WriteLine("Invalid Choice");
                    break;
                }
            }
        }