2 <clause number="10.7.1.1" title="Hiding through nesting">
3 <paragraph>Name hiding through nesting can occur as a result of nesting namespaces or types within namespaces, as a result of nesting types within classes or structs, and as a result of parameter and local variable declarations. </paragraph>
5 <example>[Example: In the example <code_example><![CDATA[
16 ]]></code_example>within the F method, the instance variable i is hidden by the local variable i, but within the G method, i still refers to the instance variable. end example]</example>
18 <paragraph>When a name in an inner scope hides a name in an outer scope, it hides all overloaded occurrences of that name. <example>[Example: In the example <code_example><![CDATA[
21 static void F(int i) {}
22 static void F(string s) {}
26 F(1); // Invokes Outer.Inner.F
29 static void F(long l) {}
32 ]]></code_example>the call F(1) invokes the F declared in Inner because all outer occurrences of F are hidden by the inner declaration. For the same reason, the call F("Hello") results in a compile-time error. end example]</example> </paragraph>