public void AttachNewChild(Child c) { if (c.Parent != null) { c.Parent.Children.Remove(c); } c.Parent = this; _children.Add(c); }
public void AddNewChild() { var c = new Child {Name = "New Child", Parent = this}; _children.Add(c); }