title: why "return ref a[0]" doesn't change the original array?
body: <p>I plan to return a reference of a value in an array (and manipulate it), however, when I pass the array in method(), the result is not what I want.</p>
  <p>And I also curious about the fact that I can't use DEBUG monitor to query the address of <code>&amp;a</code> in <code>method()</code> stack.</p>
  <p>Any one could help me with the correct use of <code>return ref</code>?</p>
  <pre class="lang-cs prettyprint-override"><code>static void Main(string[] args)
  {
  
      int?[] s = new int?[5] { 1, 2, 3, 4, 5 };
      var q = method(ref s);
      q = 999;
      Console.WriteLine(&quot;s0 is &quot; + s[0].ToString());
  }
  
  static ref int? method(ref int?[] a)
  {
      a[1] = 888;
      return ref a[0];
  }
  </code></pre>