Property Get Statement
In the Class block, declare the name, parameters, and code of the body that constitutes the property procedure that is used to obtain (return) the value.
[Public [Default]| Private] Property Get name [(arglist)]
[statements]
[[Set] name = expression]
[Exit Property]
[statements]
[[Set] name = expression]
End Property
Parameters
Public
Indicates that the property Get procedure can be accessed by other procedures in all scripts.
Default
Used only with the Public keyword, indicates that the attribute defined in the Property Get procedure is the absence of a class.
Private
Indicates that the property Get procedure is accessible only to other procedures in the Class block in which it is defined.
Name
The name of the Property Get procedure, followed by a standard variable naming convention only if it can be associated with a property let or property Set procedure in the same Class block.
ArgList
The list of variables represents The arguments that are passed to the Property Get procedure when it is invoked. Multiple parameters are separated by commas. The name of each parameter in the Property Get procedure must be the same as the corresponding parameter in the Property Let procedure, if any.
Statements
Any set of statements that will be executed in the body of the Property Get procedure.
Set
The keyword to use when the object is returned as a property Get procedure.
Expression
The return value of the Property Get procedure.
Description
If you are not explicitly declared with public or private , the Property Get procedure is default to common, that is, they are visible to all other procedures in the script. The value of a local variable in a Property Get procedure is not saved between different procedure calls.
The Property Get procedure cannot be defined inside any other procedure, such as a Function or Property let.
The Exit Property statement causes an immediate exit from the Property Get procedure. The program will continue to execute after the statement that calls the Property Get procedure. The Exit Property statement can appear anywhere in the property Get procedure, not limited to the number of times.
Like a Sub and a Property Let procedure , a Property Get procedure is a process that accepts parameters, executes a series of statements, and changes the value of a parameter. However, unlike Sub and property lets, a Property get procedure can be used to the right of an expression, using a Function Returns the value of a property in the same way as a property name.