public Male() : base() { //Grabs a random Male Title position = random.Next(0, 2); String title = Enum.GetName(typeof(MaleTitle), position); this.title = (MaleTitle)Enum.Parse(typeof(MaleTitle), title); //returns a random male Firstname position = random.Next(0, 19); String firstName = Enum.GetName(typeof(MaleFirstName), position); this.firstName = (MaleFirstName)Enum.Parse(typeof(MaleFirstName), firstName); }
/// <summary> /// Male Constructor /// </summary> public Male() { BirthDate = DateTime.Now.AddDays(-new Random().Next((30 * 365), (60 * 365))); Title = (MaleTitle) new Random().Next(0, Enum.GetNames(typeof(MaleTitle)).Length); LastName = (LastName) new Random().Next(0, Enum.GetNames(typeof(LastName)).Length); FirstName = (MaleFirstName) new Random().Next(0, Enum.GetNames(typeof(MaleFirstName)).Length); Address = new Address(); Company = new Company(); CreditCard = new CreditCard(); PhoneNumber = new PhoneNumber(); InternetInfo = new InternetInfo(FirstName.ToString(), LastName.ToString()); Ssn = new Ssn(); }