public int NumberSeter(int minValue, int maxValue) { string input = null; bool isCorrectInput = false; while (isCorrectInput == false) { NumberValueMessage(minValue, maxValue); input = InputUser(); isCorrectInput = ValidateInput.OnlyNumberValid(minValue, maxValue, input); if (isCorrectInput == true) { CorrectInputMessage(); } else { WrongInputMessage(); } } return(Convert.ToInt32(input)); }