NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

4.7 Scope

The scope of an entity's name is the set of all contexts within which it is possible to refer to that name without qualification. In general, the scope of an entity's name is its declaration context and is visible throughout its entire scope. However, an entity's declaration may contain nested declarations of entities with the same name. In that case, only the nested entity's name is visible in the nested declaration, and the containing entity's name is shadowed. Access to a shadowed name is only possible through qualification.

Shadowing through nesting occurs when namespaces or types are nested within namespaces, when types are nested within other types, and in the bodies of type members. Shadowing through the nesting of declarations always occurs implicitly, no explicit syntax is required. When a name in an inner scope shadows a name in an outer scope, it shadows all overloaded entities of that name.