title: How to trim an array in .NET?
body: <p>Say I have an array</p>
  
  <pre><code>array&lt;double&gt;^ buffer = gcnew array&lt;double&gt;(100);
  </code></pre>
  
  <p>And I want a function that does something like:</p>
  
  <pre><code>void foo(array&lt;double&gt;^% buffer)
  {
      Array::Resize(buffer, 10);
  }
  </code></pre>
  
  <p>but that don't allocate and/or move &amp;buffer[0] when you want to trim the array.</p>