I am in need of some assistance. I am trying to read a text file with a streamreader and am able to read to the line I want to replace that says "Test"
I have proven this to myself by throwing a msg box with the line I am looking for and am happy with this... I am now trying to replace this with a new string "new_value"
however when trying to write this new value it is not saving the change.
Please see code below. Any help you can provide will be greately received.
Dim rdr As StreamReader = New StreamReader("c:\test.xml")
While Not rdr.EndOfStream
Dim sfind As String = "Test"
Dim sreplace As String = ""
Dim line As String = rdr.ReadLine()
If line.Contains(sfind) Then
line = line.Replace(sfind, sreplace)