/// <summary> /// Add a child node. child nodes can be of different item type than the current node. /// </summary> /// <param name="child">Child to be added</param> public void AddChild(ObjectTreeNode <T> child) { this.children.Add(child); }
public void AddChild(ObjectTreeNode <IObjectTreeNode <object> > childWithList) { this.children.Add(new ObjectTreeNode <T> { Item = (T)childWithList.Item, }); }