TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
C# Coding Standard

Rule:  5@108Checked automatically with code checker

Synopsis:Do not re-declare a visible name in a nested scope
Severity Level:2
Category:Object lifecycle


Repeating a name that already occurs in an outer scope is seldom intended and may be surprising in maintenance, although the behaviour is well-defined.

int foo = something;

if (whatever)
	double foo = 12.34;	
        double anotherFoo = foo; // Violation.