VB.NET 1.1 Tutorial - The Module Keyword


The Module keyword is used to declare a statement containing code that is outside of any class definition. Within them you can define data-types that cannot be instantiated and whose members are all static. A Module is declared in the following manner:

Public Module MyModule
  ' Add classes, properties, methods, fields, and events for this module.
End Module 

A module's access modifier is defaulted to Friend. This can changed to Public, but no other modifier. The Module always finishes with the End keyword.


References

For more information on the Module Statement, visit MSDN at microsoft here.

What Next?

Return to the Tutorial Contents.