   Smart way of avoiding ParameterizedThreadStart?
  I was looking for a way to avoid ParameterizedThreadStart and came up with the following (for situations where you need to split a large group of objects up between multiple cores and process them in parallel)class Program    {   static object Lock = new object();   static int ThreadCount = 0;   public class Params   {  public int start;  public int end;   }   static void DoWork(Params Params)   {  int ThisThread = 0;  lock(Lock)  { ThreadCount++; ThisThread = ThreadCount;  }  Params CastedParams = (Params)Params;  System.Console.WriteLine("Thread " + ThisThread.ToString() + " started...");  System.Console.WriteLine("Start :" + CastedParams.start.ToString() + " End:" + CastedParams.end.ToString());  for (int i = CastedParams.start; i < CastedParams.end; ++i)  { System.Console.WriteLine("Thread:" + ThisThread.ToString() + " output: " + i.ToString()); Thread.Sleep(15);   }   }   static void Main(string[] args)   {  const int TotalThreads = 4;  Thread[] Threads = new Thread[TotalThreads];  for (int i = 0; i < TotalThreads; ++i)  { Params p = new Params { start = i * 10, end = (i * 10) + 10 };   Threads = new Thread(new ThreadStart(delegate{    DoWork(p);})); System.Console.WriteLine("i = " + i.ToString());  }  foreach (Thread T in Threads) T.Start();  foreach (Thread T in Threads) T.Join();  System.Console.ReadKey();   }    }After wracking my head to solve the problem where all Threads would count up as though "i" was initialized to the wrong number, and moving instantiation of Params p to outside the anonymous delegate, I was pretty happy to get this working.This is the Output:i = 0i = 1i = 2i = 3Thread 1 started...Start :0 End:10Thread:1 output: 0Thread 2 started...Start :10 End:20Thread:2 output: 10Thread 3 started...Start :20 End:30Thread:3 output: 20Thread 4 started...Start :30 End:40Thread:4 output: 30Thread:1 output: 1Thread:2 output: 11Thread:3 output: 21Thread:4 output: 31Thread:1 output: 2Thread:2 output: 12Thread:3 output: 22Thread:4 output: 32Thread:1 output: 3Thread:2 output: 13Thread:3 output: 23Thread:4 output: 33Thread:1 output: 4Thread:2 output: 14Thread:3 output: 24Thread:4 output: 34Thread:1 output: 5Thread:2 output: 15Thread:3 output: 25Thread:4 output: 35Thread:1 output: 6Thread:2 output: 16Thread:3 output: 26Thread:4 output: 36Thread:1 output: 7Thread:2 output: 17Thread:3 output: 27Thread:4 output: 37Thread:1 output: 8Thread:2 output: 18Thread:3 output: 28Thread:4 output: 38Thread:1 output: 9Thread:2 output: 19Thread:3 output: 29Thread:4 output: 39One thing that I noted as being interesting was that when I take out Thread.Sleep(15) from DoWork, the Output is as follow (each Thread appearing to run in sequence)i = 0i = 1i = 2i = 3Thread 1 started...Start :0 End:10Thread:1 output: 0Thread:1 output: 1Thread:1 output: 2Thread:1 output: 3Thread:1 output: 4Thread:1 output: 5Thread:1 output: 6Thread:1 output: 7Thread:1 output: 8Thread:1 output: 9Thread 2 started...Start :10 End:20Thread:2 output: 10Thread:2 output: 11Thread:2 output: 12Thread:2 output: 13Thread:2 output: 14Thread:2 output: 15Thread:2 output: 16Thread:2 output: 17Thread:2 output: 18Thread:2 output: 19Thread 3 started...Start :20 End:30Thread:3 output: 20Thread:3 output: 21Thread:3 output: 22Thread:3 output: 23Thread:3 output: 24Thread:3 output: 25Thread:3 output: 26Thread:3 output: 27Thread:3 output: 28Thread:3 output: 29Thread 4 started...Start :30 End:40Thread:4 output: 30Thread:4 output: 31Thread:4 output: 32Thread:4 output: 33Thread:4 output: 34Thread:4 output: 35Thread:4 output: 36Thread:4 output: 37Thread:4 output: 38Thread:4 output: 39Which I'm guessing, since the operations are so quick, they each get scheduled and can complete on their own time before another Thread gets a chance to execute an instruction. Apart from that, is this a smart way of avoiding ParameterizedThreadStart? Is there a better way of accomplishing this?   
  Have your thread call a callback method, perhaps?   