ECMA-334 C# Language Specification16.3: Using directives |
Using-directives facilitate the use of namespaces and types defined in other namespaces. Using-directives impact the name resolution process of namespace-or-type-name
s (10.8) and simple-name
s (14.5.2), but unlike declarations, using-directive
s do not contribute new members to the underlying declaration spaces of the compilation units or namespaces within which they are used.
using-directive
using-directives
using-directive
using-alias-directive
using-namespace-directive
A using-alias-directive
(16.3.1) introduces an alias for a namespace or type.
A using-namespace-directive
(16.3.2) imports the type members of a namespace.
The scope of a using-directive
extends over the namespace-member-declaration
s of its immediately containing compilation unit or namespace body. The scope of a using-directive
specifically does not include its peer using-directive
s. Thus, peer using-directive
s do not affect each other, and the order in which they are written is insignificant.
In This Section: