Ejemplo n.º 1
0
        private void Print(TreeNode <T> root, string spaces)
        {
            if (this._root == null)
            {
                return;
            }
            Console.WriteLine(spaces + root.Value);
            TreeNode <T> child = null;

            for (var i = 0; i < root.ChildrenCount; i++)
            {
                child = root.GetChild(i);
                Print(child, spaces + " ");
            }
        }