How to use ref in C#
<p>I've created a class that takes in an object as a parameter by ref. When it takes this object in it's construct it is null. Why does it stay null (uninitialized)?</p>

<pre><code>// example code, not real
class Test{
    object parent;

    public Test (ref object _parent)
    {
        parent = _parent;
    }
 }

 object n = null;
 Test t = new Test (ref n);
 n = new Something ();
</code></pre>

<p>When I tried it with a different class (<a href="http://pastebin.com/PpbKEufr" rel="nofollow">http://pastebin.com/PpbKEufr</a>), it stayed null</p>
