Imports [aliasname = ] namespace
The Imports statement syntax has these parts:
Part | Description |
---|---|
aliasname | Optional. The name by which namespace may also be known or referred to. When the Imports statement does not include aliasname, the elements defined within the specified namespace can be accessed within the module without qualification. When aliasname is specified, it must be used as a qualifier for the names contained in the namespace. |
namespace | Required. The name of the namespace being imported. |
Each module can contain any number of Imports statements. Imports statements must occur in a module before any references to identifiers within the module.
Since an alias name is specified within a module, it shadows any names that are defined outside of the module including imported names. It is not permitted to define a member at module level with the same name as an import alias.