Loading listbox with contents of text file[RESOLVED]
I'm completely new to .net and kinda trying to fool around with it. i want to load a listbox with the contents of a text file and the code in VB6 would be something like:
VB Code:
dim strTemp as string
Open App.Path + "\file.txt" For Input as #1
Do While Not EOF(1)
Line Input #1, strTemp
List1.AddItem strTemp
Wend
Just wondering what the .Net equivalent would be.
Plus, everytime I use the Application.StartUpPath + "\file.txt" it always says it cannot find the file.
Any help would be greatly appreciated.:D