title: VB.NET Dim vs. New
body: <p>What are the differences between the following constructs?  Why prefer one over the other?</p>
  
  <p>Number one:</p>
  
  <pre><code>Dim byteArray(20) as Byte
  </code></pre>
  
  <p>Number two:</p>
  
  <pre><code>Dim byteArray() as Byte = new Byte(20) {}
  </code></pre>
  
  <p>Any help would be appreciated.  </p>
  
  <p>Thank you.</p>
  
  <p><strong>Edit</strong> - I corrected some code. "ReDim" should be "Dim".</p>