This is my first jump into VB.NET, and I'm trying to make a simple To Do list. I want to open a text file, read each line, and add the data to a ListView. This is the code I have:
VB Code:
Dim fs As New IO.FileStream("todo.txt", IO.FileMode.Open) Dim sr As New IO.StreamReader(fs) Do Until sr.Peek = -1 MsgBox(sr.ReadLine()) Loop fs.Close()
The file contains three lines, but no message box is ever shown. What am I doing wrong?




Reply With Quote