Name
Sub Statement
Synopsis
[ClassBehavior
] [AccessModifier
] Subname
[(arglist
)] [statements
] [Exit Sub] [statements
] End Sub
ClassBehavior
optional; KeywordOne of the keywords shown in the following table:
Keyword |
Description |
|
Indicates that more than one declaration of this subroutine exists (with different argument signatures). |
|
For derived classes, indicates that the subroutine overrides the subroutine by the same name (and argument signature) in the base class. |
|
Indicates that the subroutine can be overridden in a derived class. |
|
Indicates that the subroutine cannot be overridden in a derived class. |
|
Indicates that the subroutine must be overridden in a derived class. |
|
In a derived class definition, indicates that calls to derived class members that are made through a base class ignore the shadowed implementation. |
|
Callable without creating an object of the class. It is, in this strange sense, shared by all objects of the class. These are also called static subroutines. |
AccessModifier
optionalPossible values are
Public
,Private
,Friend
,Protected
, orProtected
Friend
. The following table describes the effects of the various access modifiers. Note that “direct access” refers to accessing the member without any qualification, as in:classvariable = 100
and “class/object access” refers to accessing the member through qualification, either with the class name or the name of an object of ...
Get VB.NET Language Pocket Reference 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.