Hi
Newbie to VB.Net and I have a question
I need to open a text file, read each line, and if I find something in
the line, delete that line from the text file. Can anyone tell me how to
do this. Some of my code is below:
Try
FileOpen(254, "FormSettings.i ni", OpenMode.Input)
Do Until EOF(254)
LineOfText = LineInput(254)
FormName = LineOfText.Subs tring(0, LineOfText.Inde xOf("_") -
1)
If FormName = Me.Name Then
(Delete the line from the file somehow......)
Exit Do
Else
FormNameExists = False
End If
Loop
Catch ex As Exception
MsgBox("Error reading FormSettings.in i file")
Finally
FileClose(254)
End Try
Also, is there any method in VB.NET for handling .ini files?
Any help appreciated
JD
Newbie to VB.Net and I have a question
I need to open a text file, read each line, and if I find something in
the line, delete that line from the text file. Can anyone tell me how to
do this. Some of my code is below:
Try
FileOpen(254, "FormSettings.i ni", OpenMode.Input)
Do Until EOF(254)
LineOfText = LineInput(254)
FormName = LineOfText.Subs tring(0, LineOfText.Inde xOf("_") -
1)
If FormName = Me.Name Then
(Delete the line from the file somehow......)
Exit Do
Else
FormNameExists = False
End If
Loop
Catch ex As Exception
MsgBox("Error reading FormSettings.in i file")
Finally
FileClose(254)
End Try
Also, is there any method in VB.NET for handling .ini files?
Any help appreciated
JD
Comment