O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Function Statement

Syntax

[ClassBehavior][AccessModifier] Function name _
          [(arglist)] [As type][(  )] 
   [statements]
   [name = expression]
   [statements]
End Function
ClassBehavior (optional; Keyword)

One of the following keywords:

Overloads

Indicates that more than one declaration of this function exists (with different argument signatures). For more detail, see Chapter 4.

Overrides

For derived classes, indicates that the function overrides the function by the same name (and argument signature) in the base class. For more detail, see Chapter 4.

Overridable

Indicates that the function can be overridden in a derived class. For more detail, see Chapter 4.

NotOverridable

Indicates that the function cannot be overridden in a derived class. For more detail, see Chapter 4.

MustOverride

Indicates that the function must be overridden in a derived class. For more detail, see Chapter 4.

Shadows

In a derived class definition, indicates that this element shadows any elements of the same name in the base class.

Shared

A shared function is 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; Keyword)

One 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required