Possible Duplicate:
Declaring a variable inside or outside an foreach loop: which is faster/better?
Hi all,
What is the difference between two examples or is there any?
Ex 1:
for (int i = 0; i < 2; i++)
{
    Thread newThread = new Thread( ... );
    newThread.Start();
}
Ex 2:
Thread newThread;
for (int i = 0; i < 2; i++)
{
    newThread = new Thread( ... );
    newThread.Start();
}
their IL codes are same...
 
     
     
     
     
    