Method Properties

Method property sheets contain all the standard operation tabs along with the VB tab, the properties of which are listed below:

Property

Description

Compilation Unit

Specifies the compilation unit in which the method will be stored. This field is only available if the parent type is a partial type (allocated to more than one compilation unit).

Overridable

Specifies that the method can be overridden.

Overrides

Specifies that the method overrides another.

Handles

Specifies the name of the event that the method handles.

Shadows

Specifies the form of shadowing. You can choose between:


  • Shadows

  • Overloads

Library Name

Specifies the library DLL name.

Alias Name

Specifies the alias name.

Character Set

Specifies the character set of the external method.

Shadowing

To define a shadowing by name, select Shadows from the Shadowing list on the VB tab of the operation property sheet . To define a shadowing by name and signature select Overloads. In the following example, class Derived inherits from class Base:



Operation F in class Derived overloads operation F in class Base; and operation G in class Derived shadows operation G in class Base:

Public Class Derived
 Inherits Base
  Public Overloads Sub F(ByVal i As Integer)
  End Sub
  Public Shadows Sub G(ByVal i As Integer)
  End Sub
End Class

Method Parameters

You define VB .NET method parameters using operation parameters.

You can define the following parameter modifiers in PowerDesigner:

VB .NET modifier

PowerDesigner equivalent

ByVal

Select In in the Parameter Type box on the parameter property sheet General tab

ByRef

Select In/Out or Out in the Parameter Type box on the parameter property sheet General tab

Optional

Set the Optional extended attribute on the Extended Attributes tab to True

ParamArray

Select the Variable Argument checkbox on the parameter property sheet General tab

Method Implementation

Class methods are implemented by the corresponding interface operations. To define the implementation of the methods of a class, you have to use the To be implemented button in the Operations tab of a class property sheet, then click the Implement button for each method to implement. The method is displayed with the <<Implement>> stereotype.