Visual Basic 2005 Delegates

Delegates are type-safe reference types that provide similar functions to pointers in other languages. PowerDesigner models delegates as classes with a stereotype of <<Delegate>> with a single operation code-named "<signature>". The visibility, name, comment, flags and attributes are specified on the class object whereas the return-type and parameters are specified on the operation.

For information about creating and working with classes, see Classes (OOM).

You can design the following types of VB .NET delegates:

Creating a Delegate

You can create a delegate in any of the following ways:
  • Use the Delegate tool in the Visual Basic 2005 Toolbox.

  • Select Model > Delegate Objects to access the List of Delegate Objects, and click the Add a Row tool.

  • Right-click the model (or a package) in the Browser, and select New > Delegate.

Delegate Properties

Visual Basic 2005 delegate property sheets contain all the standard delegate tabs along with the following properties, located on the VB tab:

Property

Description

Explicit

Specifies the Explicit option directive for the delegate declaration.

Shadows

Specifies that the delegate redefines a delegate defined in a parent delegate.

Strict

Specifies the Strict option directive for the delegate declaration.

Compare

Specifies the Compare option directive for the delegate declaration.