title: Reading from text file to array
body: <p>I am trying to read a text file in line by line and add it to an array, current code and output are below. How would I read it in properly, i.e. get the actual text to read into the array, rather than the current output. (Console App version of VB.NET)</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>Sub Main()
      Dim file As String = "C:\path\to\file\textfile.txt"
      Dim quoteArray As New ArrayList
      FileOpen(1, file, OpenMode.Input)
      Do While Not EOF(1)
          quoteArray.Add(LineInput(1))
      Loop
      FileClose(1)
      Console.WriteLine(quoteArray)
      Console.ReadLine()
  End Sub
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>System.Collections.ArrayList
  </code></pre>