title: How can I filter out lines in a richtextbox?
body: <p>I have code that shows the name of all .dll files within a directory on a rich textbox. How would I be able to filter/hide all filenames which I specify as unimportant and keep the rest? </p>
  
  <p>Example: </p>
  
  <p>Actual directory contains: 1.dll, 2.dll, 3.dll </p>
  
  <p>Rich Textbox shows: 1.dll, 3.dll because 2.dll is specified as unimportant in the code.</p>
  
  <p>Code I currently have that displays all files.</p>
  
  <pre><code>DirectoryInfo r = new DirectoryInfo(@"E:\SteamLibrary\steamapps\common\Grand Theft Auto V");
  FileInfo[] rFiles = r.GetFiles("*.dll");
  string rstr = "";
  foreach (FileInfo rfile in rFiles)
  {
      rstr = rstr + rfile.Name + "                                                                                                              ";
  }
  string strfinalR;
  strfinalR = richTextBox3.Text + rstr;
  richTextBox3.Text = (strfinalR);
  </code></pre>