title: Converting List<T> to Array (multidimensional)
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/678178/how-can-i-convert-a-list-to-a-multi-dimensional-array">How can I convert a list&lt;&gt; to a multi-dimensional array?</a>  </p>
  </blockquote>
  
  
  
  <p>I want to have an array in form of <code>double[,]</code> for this purpose since I do not know what will be the length of this array, I want to make a <code>List</code> first then later using <code>List&lt;T&gt;.ToArray()</code> convert it to <code>double[,]</code>:</p>
  
  <pre><code>public double[,] FilterClampedData(double[,] data)
  {
      var finalData = new List&lt;double[]&gt;();
  
      //Do some stuff on parameter
  
      return finalData.ToArray(); ///Does not compile :(
  }
  </code></pre>