title: Search multiple words in a text file
body: <p>I made a code to search for several words in a text file but only the last word is searched, I would like to solve it
  code:</p>
  <pre><code>string txt_text;
  string[] words = {
    &quot;var&quot;,
    &quot;bob&quot;,
    &quot;for&quot;,
    &quot;example&quot;
  };
  StreamReader file = new StreamReader(&quot;test.txt&quot;);
  foreach(string _words in words) {
    while ((txt_text = file.ReadToEnd()) != null) {
      if (txt_text.Contains(_words)) {
        textBox1.Text = &quot;founded&quot;;
        break;
      } else {
        textBox1.Text = &quot;nothing founded&quot;;
        break;
      }
    }
  }
  </code></pre>