Variable scope and performance
<p>Below is the code i am using</p>

<pre><code>private void TestFunction()
{
  foreach (MySampleClass c in dictSampleClass)
  {
    String sText = c.VAR1 + c.VAR2 + c.VAR3
    PerformSomeTask(sText,c.VAR4);
  }
}
</code></pre>

<p>My friend has suggesed to change to (to improve performance. <strong>dictSampleClass</strong> is a dictionary. It has 10K objects)</p>

<pre><code>private void TestFunction()
{
  String sText="";
  foreach (MySampleClass c in dictSampleClass)
  {
    sText = c.VAR1 + c.VAR2 + c.VAR3
    PerformSomeTask(sText,c.VAR4);
  }
}
</code></pre>

<p><strong>My Question is, "Does above change improve performance? if yes, how?"</strong></p>

<p>WOW thats more than expected response. Most guys said "C# compiler would take care of that". So what about c compiler??</p>
