variable= Value ] End Set
Program code to be executed when the Property Set procedure is called
variable(optional; any (the data type of the property)
Typically, a Private variable to hold the property value
A keyword representing the value to be assigned to the property
Defines a Set property procedure that sets a property value
Set statement can only be used within a
The value assigned to the property is usually stored to a variable that’s Private to the class. This protects the property value from modification other than by calling the Property Set procedure.
Value keyword represents the value to be
assigned to the property. This value must be of the same data type as
The example code illustrates a class that has a simple property and a property array. The syntax documented above, rather than the “official” syntax (see the note in Section ), is used, since in our opinion it is much clearer and intuitive.
Public Enum WageConstants Rate = 0 Overtime = 1 Differential = 2 End Enum Public Class CEmployee Dim strName As String Dim decWage(2) As Decimal Public Property Name( ) As String Set(sName As String) strName = sName End Set Get Return strName End Get End Property Public Property Wage(iType As WageConstants) As Decimal Get Wage = decWage(iType) End Get Set decWage(iType) = Value End Set End Property ...