public static void Main()
var userService = new UserService();
Console.WriteLine(userService.AddUser("FirstName", "LastName", 20));
public string Name {get; set;}
public int Age {get; set;}
public bool IsOfDrinkingAge {get; set;}
public static class UserData
public static bool AddUser(User person)
public bool AddUser(string firstName, string lastName, int age)
if(string.IsNullOrWhiteSpace(firstName) || string.IsNullOrWhiteSpace(lastName))
var user = new User{ Name = firstName + " " + lastName, Age = age, IsOfDrinkingAge = canDrink};
return UserData.AddUser(user);