1.
Which of the following does a namespace NOT provide?
Logical grouping of types Help in avoiding name collisions Access control
A namespace does not provide an access control boundary; that is, there is no way to limit a
namespace member so that it is only usable inside that namespace.
2.
True or false: namespaces can be nested.
True False
Namespaces can be nested by defining one namespace inside another. There is also a shorthand
syntax: namespace Outer.Inner { ... } that is often more convenient than nesting.
3.
True or false: it is a compile time error to have two using directives if
the referenced namespaces contain a type with the same short name.
True False
If two namespaces contain types with the same short name, it is not an error for client code to
include using directives for both namespaces. However, to use the duplicate name, the client code
must use the fully qualified type name to avoid ambiguity.
4.
True or false: a namespace must be completely defined in a single source file.
True False
A namespace declaration can be discontinuous. There is no requirement that the entire namespace
be defined in one place.
5.
True or false: accessing a type defined in the same namespace requires use of the fully
qualified name.
True False
The short name is sufficient to access a type defined in the same namespace.