title: Scan text file for line containing a given string and replace the line with another string
body: <p>I want to scan my file for line that contains a particular string "black=" and if there is a match replace it with "blah blah" but I don't know how to do that. Here is what I tried but it does not work. </p>
  
  <pre><code>Dim myStreamReaderL1 As System.IO.StreamReader
  myStreamReaderL1 = System.IO.File.OpenText("C:\File.txt")
  myStreamReaderL1.ReadLine()
  If myStreamReaderL1.ReadLine.Contains("black=") Then
      Button2.Hide()
  Else
      Return
  End If
  </code></pre>