There are two types of methods: subroutines, which do not return values, and functions, which do. The body and End
construct of a method may only be omitted if the method is abstract. If no return type is specified on a function, it is implicitly Object
. The accessibility domain of the return type and parameter types of a method must be the same as or a superset of the accessibility domain of the method itself.
Sub
[ Attributes ] Identifier [ (
[ FormalParameterList ] )
]End
Sub
LineTerminator ]Function
[ Attributes ] Identifier [ (
[ FormalParameterList ] )
]As
TypeName ] [ HandlesOrImplements ] LineTerminatorEnd
Function
LineTerminator ]Shared
|Overridable
|NotOverridable
|MustOverride
|Overrides
|Overloads