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.
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.