A VB.NET module is a static class. The compiler handles this for you. Every method and property on it is static
(Shared
).
A class with a static (Shared) member on it is exactly that: a class with a static (Shared) member. You don’t have to create an instance of it to access the static (Shared) method, but you do to get to any of its instance members.
You can also define a Sub New()
in a module, and it becomes the static constructor for the module. The first time you try to invoke a member on the module, the static constructor will be invoked to initialize the static class.