title: Getting name(s) of FOLDER containing a specific SUBSTRING from the C:Temp directory in C#
body: <p>Guys as the title says it I have to get the names of FOLDERS having a particular (user indicated) sub string.</p>
  
  <p>I have a text box where the user will input the wanted sub string.
  and I am using the codes below to achieve my goal.</p>
  
  <pre><code> string name = txtNameSubstring.Text;
              string[] allFiles = System.IO.Directory.GetFiles("C:\\Temp");//Change path to yours
              foreach (string file in allFiles)
              {
                  if (file.Contains(name))
                  {
                      cblFolderSelect.Items.Add(allFiles);
                      // MessageBox.Show("Match Found : " + file);
                  }
                  else
                  {
                      MessageBox.Show("No files found");
                  }
              }
  </code></pre>
  
  <p>It does not work.
  When I trigger it,only the message box appears.
  Help ?</p>