Hola VB Section. I was wondering how to get a text file text to be added to a listbox. here what i have so far-
Code:
Try
Using sr As IO.StreamReader = New IO.StreamReader("C:\TestFile.txt")
Dim line AsString
Do
line = sr.ReadLine()
Console.WriteLine(line)
LoopUntil line IsNothing
EndUsing
Catch C As Exception
' Lets the user know what went wrong.
Console.WriteLine("The file could not be read:")
Console.WriteLine(C.Message)
EndTry
This reads the text file but doesnt really help me, i need the text to be added to a listbox. Thanks in advance
