title: Search string in multiple files using c#
body: <p>I want to search word or string in multiple file in directory.
  for example "Error" , "Warning"  If any file contain any of three word then it should print messages.all files in same directory.</p>
  
  <p>With this code I can search one word in single file but I want to search all d file which are available in directory.</p>
  
  <pre><code>      List&lt;string&gt; found = new List&lt;string&gt;();
           string line;
           using (StreamReader file = new StreamReader(textBox1.Text))
           {
               while ((line = file.ReadLine()) != null)
               {
                   if (line.Contains("Error: 1"))
                   {
                       found.Add(line);
          MessageBox.Show("Error Found");
                   }
               }
           } 
  </code></pre>