title: How to save a ref variable for later use?
body: <p>So this works..</p>
  
  <pre><code>public MyClass(ref Apple apple)
  {
      apple = new Apple("Macintosh"); // Works fine
  }
  </code></pre>
  
  <p>But is it possible to do something like this?</p>
  
  <pre><code>private Apple myApple;
  
  public MyClass(ref Apple apple)
  {
      myApple = apple;
  }
  
  public void ModifyApple()
  {
      myApple = new Apple("Macintosh"); // does not change the input variable like the first example did
  }
  </code></pre>
  
  <p>When the ref variable is copied to the member variable <code>myApple</code> it appears to lose it's 'ref-ness' and re-assigning it no longer changes the input variable. Is there a way around this?</p>