title: 'List(Of Byte())' to 'Byte()' in VB.NET
body: <p>I have a list of bytes:</p>
  
  <pre><code>Public Function GenPackets()
      Dim Stream As NetworkStream = ConnectionSocket.GetStream()
      Dim DataList As New List(Of Byte())
      Dim Data As Byte()
      DataList.Add(IntegerToByte(My.Settings.BotUID))
  
      ' TO DO       Stream.Write(Data, 0, 3)
      Return Data
  End Function
  </code></pre>
  
  <p>How can I convert <code>DataList</code> and all of its bytes to a single Byte() for use in <code>Stream.Write</code>?</p>