title: VB.NET How to declare new empty array of known length
body: <p>Is there a way in VB.NET to declare an array, and later initialize it to a known length in the code? In other words, I'm looking for the VB.NET equivalent of the following C#.NET code:</p>
  
  <pre><code>string[] dest;
  // more code here
  dest = new string[src.Length];
  </code></pre>
  
  <p>I tried this in VB, and it didn't work.</p>
  
  <pre><code>Dim dest() as string
  ' more code here
  dest = New String(src.Length)
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p><br/></p>
  
  <p><strong>NOTE</strong>: I can confirm that </p>
  
  <pre><code>Dim dest(src.Length) as string
  </code></pre>
  
  <p>works, but is not what I want, since I'm looking to separate the declaration and initialization of the array.</p>