Exemplo n.º 1
0
 // Build tree top down, assigning to older objects.
 internal void Populate(int iDepth, TreeNode thisNode)
 {
     if (iDepth<=0)
     {
         return;
     }
     else
     {
       mem = new byte[iDepth];
       mem[0] = 0;
       mem[iDepth-1] = (byte)iDepth;
       iDepth--;
       thisNode.left  = new TreeNode();
       thisNode.right = new TreeNode();
       Populate (iDepth, thisNode.left);
       Populate (iDepth, thisNode.right);
     }
 }
Exemplo n.º 2
0
 public void SettreeNode( int iKey )
 {
     itype = 3;
     AddObjectToRecord();
     TreeNode nTree = new TreeNode();
     nTree.Populate(iKey%10, nTree);
     vsMem = ( nTree );
 }