NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

8.1.1 Regular method declarations

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.

ProcedureDeclaration ::= SubDeclaration | FunctionDeclaration
SubDeclaration ::=
 [ ProcedureModifier+ ] Sub [ Attributes ] Identifier [ ( [ FormalParameterList ] ) ]
  [ HandlesOrImplements ] LineTerminator
 [ Block ]
 
[ End Sub LineTerminator ]
FunctionDeclaration ::=
 [ ProcedureModifier+ ] Function [ Attributes ] Identifier [ ( [ FormalParameterList ] ) ]
  [ As TypeName ] [ HandlesOrImplements ] LineTerminator
 [ Block ]
 
[ End Function LineTerminator ]
ProcedureModifier ::=
 AccessModifier |
 ShadowsModifier |
 Shared |
 Overridable |
 NotOverridable |
 MustOverride |
 Overrides |
 Overloads
HandlesOrImplements ::= HandlesClause | MethodImplementsClause