title: Convert List to Double Array by LINQ (C#3.0)
body: <p>I have two lists x1 and x2 of type double</p>
  
  <pre><code>List&lt;double&gt; x1 = new List&lt;double&gt; { 0.0330, -0.6463};
  List&lt;double&gt; x2 = new List&lt;double&gt; { -0.2718, -0.2240};
  </code></pre>
  
  <p>I am using the below function to convert it to double array</p>
  
  <pre><code>List&lt;List&lt;double&gt;&gt; xData = new List&lt;List&lt;double&gt;&gt; { x1, x2 };
              double[,] xArray = new double[xData.Count, xData[0].Count];
  
              for (int i = 0; i &lt; xData.Count; i++)
              {
                  for (int j = 0; j &lt; xData[0].Count; j++)
                  {
                      xArray[i, j] = xData[i][j];
                  }
              }
  </code></pre>
  
  <p><strong>Is it possible to do the same stuff (i.e. the function that is converting List to array) by using Linq.</strong> </p>
  
  <p><strong>Using : (C#3.0) &amp; Framework - 3.5</strong></p>
  
  <p>I want to do this by using Linq because I am learning it but not have sufficient knowledge to write that.</p>
  
  <p>Thanks </p>
  
  <p>Convert List to Double Array by LINQ (C#3.0)</p>