title: Pass paramater to thread's method
body: <p>In this example, I cannot pass a value to the method that is being used to run multiple threads.</p>
  
  <pre><code>private void btnStartSingleHost_Click(object sender, EventArgs e)
  {
      for (int i = 0; i &lt; 500; i++)
          new System.Threading.Thread(establishConnection).Start();
  }
  
  private void establishConnection()
  {
      new SinglePortScan(tbHostIP.Text, int.Parse(nupdHostPort.Value.ToString()), int.Parse(nupdHostTimeout.Value.ToString()), ref tbSingleResults).connect();
  }
  </code></pre>
  
  <p>What can I do if I want to for example pass value of <code>i</code> of the loop to the method that thread is calling?</p>