Benefits of scoping blocks?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/690711/when-do-you-use-code-blocks">When do you use code blocks?</a>  </p>
</blockquote>



<p>Ok, this might be a stupid question and I might be missing something obvious but as I slowly learn C# this has kept nagging me for a while now.</p>

<p>The following code obviously compiles just fine:</p>

<pre><code>public void Foo()
{
    {
        int i = 1;
        i++;
    }

    {
        int i = 1;
        i--;
    }
}
</code></pre>

<p>I understand that <code>{}</code> blocks can be used for scoping. The question is why would you want to do this? What problems does this feature solve?</p>

<p>There is no harm that I can see in using them barring that it does add to a more confusing code as these kind of scopes can be more easily overlooked compared those "tied" to flow controls, iterations, etc.</p>
