Possible Duplicate:
Do you use curly braces for additional scoping?
Floating curly braces in C#
By accident I spotted the following in C#:
if(condition) return true;
{
// perform this if true
}
When investigating, I realised that you can simply apply curly braces to blocks of code, which made me think it would be akin to 'scoping' the code:
{
string foo = "foo";
}
string foo = "new foo!";
...but it doesn't.
Are there any benefits, features or uses of why you would want to do this?