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:
To create a delegate at the namespace level, create a class with the <<Delegate>> stereotype, and add an operation with the <<Delegate>> stereotype to this class and define a visibility for this operation. This visibility becomes the visibility of the delegate
To create a delegate in a class, module, or structure, you just have to create an operation with the <<Delegate>> stereotype. In the following example, class Worker is inner to module Utilities. Both contain internal delegates designed as operations with the <<Delegate>> stereotype
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. |