Export (0) Print
Expand All

4.7.1 Qualified Name Resolution

Visual Studio .NET 2003

Given a qualified namespace or type name of the form N.R, where R is the rightmost identifier in the qualified name, the following steps describe how to determine to which namespace or type the qualified name refers:

  1. Resolve N, which may be either a qualified or unqualified name.
  2. If resolution of N fails or does not resolve to a namespace or type, a compile-time error occurs. If R matches the name of a namespace or type in N, then the qualified name refers to that namespace or type.
  3. If N contains one or more standard modules, and R matches the name of a type in exactly one standard module, then the qualified name refers to that type. If R matches the name of types in more than one standard module, a compile-time error occurs.
  4. Otherwise, a compile-time error occurs.
    Note   An implication of this resolution process is that type members do not shadow namespaces or types when resolving namespace or type names.

See Also

4.7 Type and Namespace Names | 11.12.3 Operator Resolution | 11.8.1 Overloaded Method Resolution

Show:
© 2014 Microsoft