/// <summary> used to let user choose what format they want their names to be shown in.</summary> /// <param name="listOFNames"> takes the list of names to be displayed</param> public static void FormatMenu(NameList listOFNames) { UtilityNamespace.Menu FormatMenu = new UtilityNamespace.Menu("Format Menu");//menu for name format FormatMenu = FormatMenu + "Original Format" + "First Name First" + "Last Name First" + "Return to Name Menu"; NameFormat formatChoice = (NameFormat)FormatMenu.GetChoice(); switch (formatChoice) //switch case for user choice { case NameFormat.ORIGINAL: //list names in original given format listOFNames.Format = NameFormat.ORIGINAL; listOFNames.Display(); break; case NameFormat.FIRST: //list names in First Name First format Tools.DisplayList(listOFNames.SortFirst()); break; case NameFormat.LAST: //list names in last name first format Tools.DisplayList(listOFNames.SortLast()); break; case NameFormat.QUIT: //returns to previous menu Console.WriteLine("Returning to Name menu"); return; } Tools.PressAnyKey(); return; }