public static void ManageUserAccount(AccountUser currentUser) { bool stayInLoop = true; while (stayInLoop) { Console.WriteLine(DisplayUserMenu()); int userResponseInt = ReadNumber(); if (userMenuActions.ContainsKey(userResponseInt)) { stayInLoop = userMenuActions[userResponseInt](currentUser); } else { Console.WriteLine("Unknown option"); } } }
private static bool UserActionDisplayAccount(AccountUser currentUser) { Console.WriteLine("Solde du compte : " + currentUser.SoldeCompte()); return(true); }