public FamilyTree() { Person = new Person { FirstName = string.Empty, LastName = string.Empty, Childern = new List <Person>(), Sex = Gender.Male, Income = double.MinValue, DateOfBirth = DateTime.Now.AddYears(-30), Mother = new Person(), Father = new Person(), DateOfDeath = null }; _stringBuilder = new StringBuilder(); _dateOfCreation = DateTime.Now; _instanceFamilyTree = this; Persons = new List <Person>(); }
public static FamilyTree Create() { return(_instanceFamilyTree ?? (_instanceFamilyTree = new FamilyTree())); }