Ejemplo n.º 1
0
        private Node234 getNextChild(Node234 theNode, string dValue)
        {
            int j;
            int numItems = theNode.getNumItems();

            for (j = 0; j < numItems; j++)
            {
                if (string.Compare(dValue, theNode.getItem(j).Value, StringComparison.CurrentCulture) < 0)
                {
                    return(theNode.getChild(j));
                }
            }
            return(theNode.getChild(j));
        }
Ejemplo n.º 2
0
        private void recDisplayTree(Node234 thisNode, int level, int childNumber, ref string display)
        {
            int numItems = thisNode.getNumItems();

            for (int j = 0; j < numItems + 1; j++)
            {
                Node234 nextNode = thisNode.getChild(j);
                if (nextNode != null)
                {
                    recDisplayTree(nextNode, level + 1, j, ref display);
                }
                else
                {
                    thisNode.displayNode(ref display);
                    return;
                }
            }
        }