Creating new a Thread() is asking ParameterizedThreadStart object as a parameter in C sharp
<p>ah i'm very noob in Thread Programming and just started a basic step to create multiple threads, so i googled and got some snippets about creating Thread in c#, here is the snippet i found:</p>

<pre><code>public MyThread(string name) { 
    count = 0; 
    thrd = new Thread(new ThreadStart(this.run)); // here m getting error
    thrd.Name = name; 
    thrd.Start(); 
  } 

  // Entry point of thread. 
  void run() { 
    Console.WriteLine(thrd.Name + " starting."); 

    do { 
      Thread.Sleep(500); 
      Console.WriteLine("In " + thrd.Name + 
                        ", count is " + count); 
      count++; 
    } while(count &lt; 10); 

    Console.WriteLine(thrd.Name + " terminating."); 
  } 
} 
</code></pre>

<p>The error is <strong>The best overloaded method match for System.Threading.Thread.Thread(System.Threading.ParameterizedThreadStart) has some invalid arguments</strong></p>

<p>Why the Thread constructor is asking me for ParameterizedThreadStart object, i want simple ThreadStart object to be passed.</p>

<p>Another Thing is ThreadStart class doesn't have a constructor with 1 argument i.e. it takes 0 arguments, but in snippet they have shown  <code>new ThreadStart(this.run)</code> this ?
m using C# 2008</p>

<p>Here is the complete code</p>

<pre>

using System; 
using System.Threading; 

class MyThread { 
  public int count; 
  public Thread thrd; 

  public MyThread(string name) { 
    count = 0; 
    thrd = new Thread(new ThreadStart(this.run)); 
    thrd.Name = name; 
    thrd.Start(); 
  } 

  // Entry point of thread. 
  void run() { 
    Console.WriteLine(thrd.Name + " starting."); 

    do { 
      Thread.Sleep(500); 
      Console.WriteLine("In " + thrd.Name + 
                        ", count is " + count); 
      count++; 
    } while(count 
</pre>
