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.3 Events

Events are declared using event declarations. An event declaration consists of either an identifier and a delegate type or a method declaration. The method declaration, if specified, must be a subroutine (that is, no return type) and must not have a body or an End construct. Attributes specified on the method declaration apply to the event itself. If a delegate type is specified, the delegate type may not have a return type. The accessibility domain of the parameter types must be the same as or a superset of the accessibility domain of the event itself.

In addition to the member name added to the type's declaration space, an event declaration implicitly declares several other members. Given an event named E, the following members are added to the declaration space:

If a type attempts to declare a name that matches one of the above names, an error will result. It is not possible to override or overload any of the introduced members, although it is possible to shadow them in derived types. Events may be shared.

EventMemberName ::= QualifiedIdentifier
EventMemberDeclaration ::=
 [ EventModifiers+ ] Event EventOrDelegate [ EventImplementsClause ] LineTerminator
EventOrDelegate ::=
 [ Attributes ] Identifier [ ( [ FormalParameterList ] ) ] |
 [ Attributes ] Identifier As DelegateTypeName
EventModifiers ::= AccessModifiers | ShadowsModifier | Shared