title: How to convert list of arrays into a multidimensional array
body: <p>I need to convert the following collection into double[,]:</p>
  
  <pre><code> var ret = new List&lt;double[]&gt;();
  </code></pre>
  
  <p>All the arrays in the list have the same length. The simplest approach, <code>ret.ToArray()</code>, produces double[][], which is not what I want. Of course, I can create a new array manually, and copy numbers over in a loop, but is there a more elegant way?</p>
  
  <p><strong>Edit:</strong> my library is invoked from a different language, Mathematica, which has not been developed in .Net. I don't think that language can utilize jagged arrays. I do have to return a multidimensional array.</p>