The scope of a local variable/constant is its own block and nested block.
You cannot declare another local variable with the same name in the block or in any nested blocks. For example:
static void Main() { int x; { int y; int x; // Error - x already defined } { int y; // OK - y not in scope } Console.Write (y); // Error - y is out of scope }