Modules Overview

Modules are a specific feature of Visual Basic programming language. You can think of modules as classes exposing only shared members; each module is defined within a Module..End Module code block. The following code provides an example of a module:

image

Differently from Visual C#, Visual Basic does not directly support shared classes, whereas it provides support for classes with only shared members. According to this, the preceding module is the Visual Basic representation of the following class:

image

If you had any other member in this ...

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.