Hi, I want to make array with loading text file and display it in ListBox. I used this code:
Dim strFileName() As String '// String Array.
Dim tempStr As String = "" '// temp String for result.
strFileName = IO.File.ReadAllLines("C:\zel.txt") '// add each line as String Array.
For Each myLine In strFileName '// loop thru Arrays.
tempStr &= myLine & vbNewLine '// add Array and new line.\
ListBox1.Items.Add(tempStr)
Next
But when i click to button, in listbox adds many lines, but all lines is equal to first line of the text file. I want to display all lines in listbox. How can I do it? Thanks!