Here is my code:
Dim sr1 As StreamReader = New StreamReader(Ap plication.Start upPath &
"\Controls.ini" )
strGameExists = "no"
intCheck = 0
Do
strLine = sr1.ReadLine()
intCheck = InStr(strLine, "[" & strParentName & "]")
If intCheck > 0 Then
strGameExists = "yes"
End If
Loop Until intCheck > 0 Or strLine Is Nothing
sr1.Close()
If strGameExists = "yes" Then
do something
else
do something else
End if
The code works great in the debugger. It finds the string, sets
strGameExists to "yes" and executes my code. However, at runtime it always
executes my do something else code. Am I missing something here?
Thank you,
John