title: C# - How to create an array from an enumerator
body: <p>In C#, what's the most elegant way to create an array of objects, from an enumerator of objects?  e.g. in this case I have an enumerator that can return byte's, so I want to convert this to byte[].</p>
  
  <p>EDIT: Code that creates the enumerator:</p>
  
  <pre><code>IEnumerator&lt;byte&gt; enumerator = updDnsPacket.GetEnumerator();
  </code></pre>