Chapter 8. Modules and Namespaces

While programs primarily consist of variables and executable code, they must also be organized in a way that is comprehensible to both the programmer and anyone else who might read the programmer's code. Modules are used to organize variables and methods into logical units, while namespaces are used to organize modules and types into higher-level groupings.

Modules

All fields and methods in a Visual Basic .NET program must be contained within a type. In the examples in previous chapters, the simplest type, a module, was used. Modules are just containers for fields and methods, and unlike types such as classes and structures, they are rarely referred to directly.

Get Visual Basic .NET Programming Language, The 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.