示例#1
0
        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");
                }
            }
        }
示例#2
0
 private static bool UserActionDisplayAccount(AccountUser currentUser)
 {
     Console.WriteLine("Solde du compte : " + currentUser.SoldeCompte());
     return(true);
 }