public void RemoveAllChildren(Person p) { if (p.HasChildren() == true) { foreach (Person a in p.Children) { if (p.PersonSex == (Sex)0) { a.Father = null; } if (p.PersonSex == (Sex)1) { a.Mother = null; } } } }