title: Recursive call overload method
body: <p>I am tryting to display the number of tmp files recursively using the below code. But when I call the DirSearch() for recursive purpose; I get an error No overload method can take 1 argument.</p>
  
  <pre><code>namespace TestForm
  {
      public partial class TEST : Form
      {
          public TEST()
          {
              InitializeComponent();
          }
  
  
          private void button1_Click(object sender, EventArgs e)
          {
            TEST search = new TEST();
              search.DirSearch();
              int result = search.DirSearch();
              label1.Text = result.ToString();
  
          }
  
          public  int DirSearch()
          {
  
              int count = 0;
              var sDir = Directory.GetFiles(@"C:\", "*.tmp", SearchOption.AllDirectories);
  
              try
              {
  
                  foreach (string d in sDir)
                  {
                      foreach (string f in Directory.GetFiles(d, "*.tmp"))
                      {
                          string extension = Path.GetExtension(f);
                          if (extension != null &amp;&amp; (extension.Equals(".tmp")))
                          {
                              count++;
                              return count;
                          }
                      }
                      DirSearch(d);
  
                  }
              }
              catch (UnauthorizedAccessException)
              {
  
              }             
  
          }         
  
      }        
  }
  </code></pre>