static void AddPartner(List <Person> People, Person currentPerson, bool isGrandParent, bool isParent) { Person partner = TypeOfPartner(isGrandParent, isParent); partner.InputPersonInformation(); currentPerson.Partner = partner; People.Add(partner); }
static void AddChild(List <Person> People, Person currentPerson, bool isGrandParent, bool isParent) { Person child = TypeOfChildren(currentPerson, isGrandParent, isParent); if (child == null) { Console.WriteLine($"{currentPerson.Name} is granchildren!"); return; } else { child.InputPersonInformation(); currentPerson.Children.Add(child); People.Add(child); } }