title: Recursive Insertion in a Binary Tree
body: <p>Why reason the member variables LEFT and RIGHT never change when i make the recursive call?
  Here's the Source Code:</p>
  
  <pre><code>public class C_Nodo
  
  {
      int dato;
      C_Nodo left;
      C_Nodo right;
  
      public int DATO
      {
          get { return dato; }
          set { dato = value; }
      }
  
      public C_Nodo LEFT
      {
          get { return this.left; }
          set { this.left= value; }
      }
  
      public C_Nodo RIGHT
      {
          get { return this.right; }
          set { this.right = value; }
      }
  
      public C_Nodo(int inf)
      {
          this.dato = inf;
          this.left = null;
          this.right = null;
      }
  }
  
  public class C_Arbol_Bin
  
  {   
      C_Nodo root;
  
      public C_Arbol_Bin()
      {
          root = null;
      }
  </code></pre>
  
  <p>Simple insertion in the root or make the recursive call</p>
  
  <pre><code>    public void inserta(int dat)
      {
          if (root == null)
          {
              root = new C_Nodo(dat);
          }
          else
          {
              insert_Order(this.root, dat);
          }
      }
  </code></pre>
  
  <p>Here i make the recursive insertion in ordered way depending of the value that contains the father node but RIGH and LEFT never change.</p>
  
  <pre><code>    public void insert_Order(C_Nodo tree, int inf)
      {
          if (tree == null)
          {
              tree = new C_Nodo(inf);
          }
          else
          {
              if (tree.DATO &gt; inf)
              {
                  insert_Order(tree.LEFT, inf);
              }
              else
              {
                  insert_Order(tree.RIGHT, inf);
              }
          }
      }
  }
  </code></pre>