TEXT file csvSTOCKS.TXT contains the following:
Stock 1,200,300,200,200
Stock 2,200,300,200,200
Stock 3,200,300,200,200
Stock 4,200,300,200,200
Stock 5,200,300,200,200
I'm attempting to read each line in the text file and put it in the array of strings lines()
Dim sr As StreamReader = New StreamReader("csvSTOCKS.TXT")
Dim lines() As String
Do While (sr.Peek <> -1)
lines = sr.ReadLine
Loop
lstOutput.Items.Add(lines(0))
BUT, I get the following error when I try to assign lines = sr.ReadLine
ERROR:
Error 1 Value of type 'String' cannot be converted to '1-dimensional array of String'.
If this cannot be done, is there a way to do that ?
tx