title: Best way to convert an IEnumerable<T> to an T[]
body: <p>What is the best way to convert from a generic <code>IEnumerable&lt;T&gt;</code> implementation to an array of T?  The current solution I have looks like the following:</p>
  
  <pre><code>IEnumerable&lt;string&gt; foo = getFoo();
  string[] bar = new List&lt;string&gt;(foo).ToArray();
  </code></pre>
  
  <p>The transfer through a <code>List&lt;T&gt;</code> seems unneccesary, but I haven't been able to find a better way to do it.</p>
  
  <p>Note: I'm working in C# 2.0 here.</p>