public void Menu() { Console.WriteLine("Size of List is " + store.ContactListSize); int flag = 1; while (flag != 0) { Console.WriteLine("\nType keywords to perform Action\n Add \tDisplay Search \tUpdate \tRemove \tExit"); string choice = Console.ReadLine(); switch (choice.ToLower()) { case "add": store.Add(ContactDetails()); break; case "display": Display(store.ContactList); break; case "search": try { List <Contact> matching = store.Search(Console.ReadLine()); Display(matching); } catch (StudentNotFoundException ex) { Console.WriteLine(ex.Message); } break; case "update": Console.WriteLine("Ënter the name you want to update"); store.Update(Console.ReadLine()); break; case "remove": store.Remove(Console.ReadLine()); Display(store.ContactList); break; case "exit": store.Serialize(); flag = 0; break; default: Console.WriteLine("Enter Proper KeyWord"); break; } } }