
Module...End Module Statement | 371
The Language
Reference
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
• The
Mod operator returns the data type of number1 and number2 if they are the same
type, or the widest data type of
number1 and number2 if they are different.
Example
MsgBox(10 Mod 3) ' returns 1
Version Differences
The Mod operator can be overloaded beginning in the 2005 edition of Visual Basic. The
custom overload can assign any logic or restrictions on its use.
See Also
IEEERemainder Function
Module...End Module Statement
Syntax
[accessModifier] Module name
[statements]
End Module
accessModifier (optional)
Specifies the scope and accessibility of the module. One of the following access
levels:
If omitted, the
Friend access level is used.
name (required)
The name of the code module.
statements (optional)
Code that defines the members of the module.
Description
The Module...End Module statement defines a code block as a code module. A module is
similar to a class where every member is
Shared by default. Modules may contain
fields, properties, methods, events, and other types.
Usage at a Glance
• Modules may not be nested, nor may modules inherit from any other type.
• Since all members of a module are essentially Shared, modules cannot be instanti-
ated as objects.
Version Differences
The Module statement is new to VB under .NET, but the idea ...