 <p>As SLaks said best should be a List:</p> <pre><code>Dim sArray As New List(Of String) Dim fStream As New System.IO.FileStream("messages.txt", IO.FileMode.Open) Dim sReader As New System.IO.StreamReader(fStream) Do While sReader.Peek &gt;= 0 sArray.add(sReader.ReadLine) Loop fStream.Close() sReader.Close() </code></pre>