C# Passing a part of an array as an argument of a function by reference
<p>Is the C# code below the equivalent way of trying to achieve the same as the C++ code?
Is there any way to avoid the copy (while not sending the whole array to the function)?</p>

<p>C++</p>

<pre><code>static void somefunction(double* v, int nb)
{
//something that will update v[0],v[1], ... v[nb-1]
}

double * myarray=new double[100];
somefunction(&amp;myarray[10],5);
//...
delete [] myarray;
</code></pre>

<p>C#</p>

<pre><code>static void somefunction(double[] v, int nb)
{
//something that will update v[0],v[1], ... v[nb-1]
}

double[]  myarray=new double[100];
double[] temp_array=new double[5];
somefunction(temp_array,5);
temp_array.CopyTo(myarray,10);
</code></pre>
