public static bool ValidatePerson(Person person) { if (string.IsNullOrEmpty(person.Firstname)) { StandardMessages.DisplayErrorMessage(person.Firstname); return(false); } else if (string.IsNullOrEmpty(person.Lastname)) { StandardMessages.DisplayErrorMessage(person.Lastname); return(false); } return(true); }
static void Main(string[] args) { StandardMessages.WelcomeMessage(); var user = PersonDataCapture.Capture(); bool isUserDataValid = Validator.ValidatePerson(user); if (isUserDataValid == false) { StandardMessages.EndApplication(); return; } AccountGenerator.GeneratorAccount(user); StandardMessages.EndApplication(); }