title: C# byte array conversion to VB.NET
body: <p>As per my last question I'm borrowing some code from the Opus project to integrate into VB.NET software.</p>
  
  <p>Consider</p>
  
  <pre><code>byte[] buff = _encoder.Encode(segment, segment.Length, out len);
  </code></pre>
  
  <p>which I've translated to:</p>
  
  <pre><code>Dim buff(wavEnc.Encode(segment, segment.Length, len)) As Byte
  </code></pre>
  
  <p>It is throwing a:</p>
  
  <blockquote>
    <p>Value of type '1-dimensional array of Byte' cannot be converted to 'Integer' error...</p>
  </blockquote>
  
  <p>How can I fix this problem?</p>