public static string RegisterOrLogin(string message, List <Account> accounts) { string output = ""; try { int choice = int.Parse(GetUserInput(message)); if (choice - 1 == 0) { //call on Register method string username = GetUserInput("Please enter a username: "******"Please enter a password: "******"Please enter your username: "******"Please enter your password: "******"Invalid Entry! " + message, accounts)); } } catch (IndexOutOfRangeException) { return(RegisterOrLogin("Invalid Numeric Entry! " + message, accounts)); } catch (FormatException) { return(RegisterOrLogin("Invalid Entry! " + message, accounts)); } return(output); }
//methods public static void SetIsLogIn(bool login) { ATM setLogin = new ATM(login); }