I am using VB 2101 express, I am try to right this program but it will not go past the end of my loop, does anyone know why?
If (Not System.IO.Directory.Exists(root + "\setting")) Then
System.IO.Directory.CreateDirectory(root + "\setting")
End If
'loads world settings
If File.Exists(root + "\setting\world.txt") Then
Dim ioFile As New StreamReader(root + "\setting\world.txt")
Dim ioLine As String ' Going to hold one line at a time
Dim ioLines As String ' Going to hold whole file
ioLine = ioFile.ReadLine
ioLines = ioLine
Do
ioLine = ioFile.ReadLine
ioLines = ioLines & vbCrLf & ioLine
cmbworld.Items.Add(ioLine)
Loop Until ioLine = "" '***<--- IT STOPS HERE!***
Else
System.IO.File.Create(root + "\setting\world.txt")
End If
Wouldn’t this be simplier?
MSDN: File.ReadLines Method (String)