Function which returns reference to be edited in c#
<p>Is there a way to have a function return a editable reference to some internal data. Here's an example I hope helps show what I mean.</p>

<pre><code>class foo
{
    public int value;
}

class bar
{
    bar()
    {
       m_foo = new foo();
       m_foo.value = 42;
    }
    private m_foo;
    foo getFoo(){return m_foo;}
}

class main
{
    int main()
    {
        bar b = new bar();
        b.getFoo().value = 37;
    }
}
</code></pre>

<p>The return of getFoo() according to "==" is the same as the internal m_foo until I try to edit it. In c/c++ I'd return a reference or pointer.</p>
