Efficiency: Creating an array of doubles incrementally?
<p>Consider the following code:</p>

<pre><code>List&lt;double&gt; l = new List&lt;double&gt;();

//add unknown number of values to the list
l.Add(0.1); //assume we don't have these values ahead of time.
l.Add(0.11);
l.Add(0.1);

l.ToArray(); //ultimately we want an array of doubles
</code></pre>

<p>Anything wrong with this approach? Is there a more appropriate way to build an array, without knowing the size, or elements ahead of time?</p>
