title: send pointer from a class1() to class2() in c#
body: <p>I have a class and created a node in it.I want to send address of the node to a function in class2() in c#.
  Class Node in Class1() different to Class Node in Class2(). I want to nodes in Class2() are pointing to nodes in Class1().
  Please help.</p>
  
  <pre><code>public class Class1()
  {
     public class Node
      {
          public int x=0, y=0, cost=0;
          public Node up=null, left=null, down=null, right=null, parent=null;
      }
    private Node root=null;
    class2 p=new class2();
    public void function1()
      {
          var tree = new Node();
          root = tree;
          p.function2(root);
      }
  }
  ///////////////////////////////////
  public class Class2()
  {
  public class Node
      {
          public object NodeContent;
          public Node Next;
      }
  
  public void function2(root)
      {
  ..............................
      }
  }
  </code></pre>