title: C# : Method name expected
body: <p>I have that method that counts files in a certain folder:</p>
  
  <pre><code>    private void countfiles(string path)
      {
          if (path != "")
          {
              DirectoryInfo dir = new DirectoryInfo(path);
  
              foreach (FileInfo filesindires in dir.GetFiles())
              {
                  if (filesindires.FullName != Application.ExecutablePath)
                  {
                      num_files++;
                      Thread.Sleep(1);
                  }
              }
  
              foreach (DirectoryInfo dirsinfolder in dir.GetDirectories())
              {
                  countfiles(dirsinfolder.FullName);
              }
          }           
      }
  </code></pre>
  
  <p>and when the user clicks on the count button I wanted to make a thread, so the program doesn't hang.</p>
  
  <pre><code>Thread count = new Thread(new ThreadStart(countfiles(@"E:/test")));
  </code></pre>
  
  <p>But I get this error even before debugging:</p>
  
  <pre><code>Method Name Expected
  </code></pre>
  
  <p>I dont understand; what does that error need from me?</p>
  
  <p>Finally thanks a lot for your help in advance.</p>