title: C# read a text file and search for string
body: <p>In C# how can I open the text file , search for string "mystring" and if string is there then set variable <strong>Vara</strong> = 1 else <strong>Vara</strong>= 0 .</p>
  
  <p>Thanks in advance </p>