1.

What are class properties?

Answer»

Class properties, such as Property Let, which handles the process of data validation and assigning the new value to the private variable. Property set, which assigns the new property value to the private object variable.

Read-only properties have only a Property Get procedure while write-only properties (which are rare) have only a Property Let or a Property Set procedure.

Example −

Class Comp      Private modStrType   Private OS    Public Property Let ComputerType(strType)      modStrType = strType   End Property    Public Property Get ComputerType()      ComputerType = modStrType   End Property    Public Property Set OperatingSystem(oObj)      Set OS = oObj   End Property    Public Property Get OperatingSystem()      Set OperatingSystem = OS   End Property End Class


Discussion

No Comment Found