Name
Function Statement
Synopsis
[ClassBehavior
][AccessModifier
] Functionname
_ [(arglist
)] [Astype
][( )] [statements
] [name = expression
] [statements
] End Function
ClassBehavior
optional; KeywordOne of the following keywords:
Overloads
Indicates that more than one declaration of this function (with different argument signatures) exists.
Overrides
For derived classes, indicates that the function overrides the function by the same name (and argument signature) in the base class.
Overridable
Indicates that the function can be overridden in a derived class.
NotOverridable
Indicates that the function cannot be overridden in a derived class.
MustOverride
Indicates that the function must be overridden in a derived class.
Shadows
In a derived class definition, indicates that this element shadows any elements of the same name in the base class.
Shared
Makes the function 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 functions.
AccessModifier
optional; KeywordOne of the following keywords:
Public
,Private
,Protected
,Friend
,Protected
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 that class:
Direct access scope |
Class/objectaccess ... |
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.