Scope

Namespaces have scope of visibility. As a rule, namespaces have public visibility because they can be recognized within the project, from other projects that reference the project defining the namespace and from external assemblies. Because of this behavior, namespace declarations can be adorned neither with qualifiers nor with attributes. Members defined within namespaces can only be Friend or Public. If you do not want the external world to use some members defined within a namespace, you need to mark such members as Friend. By default, Visual Basic considers members within namespaces as Friend. If you want them to be of public access, you need to explicitly mark them as Public.

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.