Special Form “Module” in Visual Basic

Among all the existing Microsoft .NET programming languages, only Visual Basic has modules. And even here a module is deceptive packaging, because what’s called a module is basically just a class with static methods, properties, and members that cannot be instantiated, like a class with a constructor marked with the access modifier Private, or an abstract class). For the record:

  • A module cannot be instantiated; neither can an abstract class or a class with a private constructor.

  • A module cannot provide overridable procedures; neither can static procedures of a class.

  • A module can provide only procedures, which can be accessed only directly, without an object instance. The same applies to the static procedures ...

Get Microsoft® Visual Basic® 2010 Developer’s Handbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.