Children
TreeNode
public
Collection<TreeNode> Children
EX1
void TreeNode_Children_ex1() { Tree myTree; TreeNode tn1, tn11, tn12; tn1 = myTree.AddTextNode("abc", "Name", 1); tn11 = tn1.AddTextNode("def", "Addr", 11); tn12 = tn1.AddTextNode("ghi", "Mail", 12); out_tree(myTree); /* myTree | Name(abc) / \ Addr(def) Mail(ghi) */ foreach(TreeNode tn in tn1.Children) { // Display each children's value out_str("Children value = " + tn.strVal); } }
Children are all next level's nodes that are direct adjacent to "this" node.
origin.h