title: A property, indexer or dynamic member access may not be passed as an out or ref parameter with readonly property
body: <p>I know there's a lot of question about this error, but I haven't found anyone which solves this scenario:</p>
  
  <p>I've a readonly property and inside a method I want to use it (not assign it) so the solution to the error can't be the typical one:</p>
  
  <pre><code>var a = myOjb.MyProp;
  DoSomething(a);
  myObj.MyProp = a;
  </code></pre>
  
  <p>Because that code won't compile such as MyProp is readonly and cannot be assigned.</p>
  
  <p>Basically what I want is to write the Stream of Response property in a method like this:</p>
  
  <pre><code>public ActionResult Guardar()
  {
      try
      {
          SomeMethod(ref Response.OutputStream);
          Response.AddHeader("Content-Disposition", String.Format("attachment; filename={0}", name));
          Response.ContentType = "Application/pdf";
          return null;
      }
      catch { }
  }
  
  public void SomeMethod(ref Stream responseStream)
  {
      responseStream.Write(new byte[] { 1, 2, 5, 3 }, 0, 4);
  }
  </code></pre>
  
  <p>How can I do this?</p>
  
  <p>Thanks, Diego</p>
  
  <p><em>Note</em>: The code is just an example.</p>