Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Dim list As New List(Of String) ' Open file.txt with the Using statement. Using r As StreamReader = New StreamReader("C:\temp\Output.txt") ' Store contents in this String. Dim line As String ' Read first line. line = r.ReadLine ' Loop over each line in file, While list is Not Nothing. Do While (Not line Is Nothing) ' Add this line to list. list.Add(line) 'Me.ListBox1.Items.Add(line) ' Display to console. 'Console.WriteLine(line) ' Read in the next line. line = r.ReadLine Loop End Using