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

Event Statement

Syntax

[accessmodifier] [Shadows] Event eventName [(arglist)] 
[Implements interfacename.interfaceeventname]
accessmodifier (optional; Keyword)

Can be one of Public, Private, Protected, Friend, and Protected Friend

Shadows (optional; Keyword)

Indicates that the event shadows any programming elements of the same name in a base class

eventName (required; String literal)

The name of the event

arglist is optional and has the following syntax:

[ByVal | ByRef] varname[( )] [As type]
ByVal (optional; Keyword)

The argument is passed by value; that is, a local copy of the variable is assigned the value of the argument.

ByRef (optional; Keyword)

The argument is passed by reference; that is, the local variable is simply a reference to the argument being passed. All changes made to the local variable are reflected in the calling argument. ByRef is the default method of passing variables.

varname (required; String literal)

The name of the local variable containing either the reference or value of the argument.

type (optional; Keyword)

The data type of the argument. It can be Byte, Boolean, Char, Short, Integer, Long, Single, Double, Decimal, Date, String, Object, or any user- defined type, object type, or data type defined in the BCL.

Implements interfacename.interfaceeventname (optional)

Indicates that the event implements a particular event named interfaceeventname in the interface named interfacename.

Description

Defines a custom event that the object can raise at any time ...

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