How to properly return an object that is equal to null? (simplified bst)
<p>I've tried to implement a binary-search-tree(BST) insert using the following method but i really don't get why i get the value instead of the actual "reference" to the node.</p>

<p>I've done other implementations that worked fine but I really want to understand why instead of getting the pointer to let's say <code>node.m_left</code> I get just it's value (<code>null</code>). </p>

<p>How can I get that without resorting to unsafe code ?
The reason i'm choosing this way is because searching and inserting are closely related and i don't want to implement the same thing twice.</p>

<pre><code>public void Add(int value)
{
    if (root == null)
    {
        root = new Node(value);
        return;
    }
    Node parent = null , 
         res;
    //finding the correct place
    res = Find(value, root, ref parent);

    if (res == null) //probably redunant
    {
        //once found create a node and asign it's parent
        res = new Node(value);
        res.m_parent = parent;
    }
    //EvaluateAVT(res);


}

private Node Find(int value, Node node, ref Node parent,bool justfind = false)
{

    if (node.Data == value &amp;&amp; justfind)
    {
        return node;
    }
    if (node.Data &gt;= value)
    {
        if (node.m_left == null)
        {
           parent = node;
           return node.m_left;
        }
        return Find(value,node.m_left,ref parent ,justfind);
    }
    else
    {
        if (node.m_right == null)
        {
            parent = node;
            return node.m_right;
        }
        return Find(value, node.m_right, ref parent, justfind);
    }
}
</code></pre>