Property Get statement
InClassBlock, the Declaration constitutes the value used to obtain (return)AttributeThe name, parameters, and code of the process subject.
[Public [Default]| Private] Property Get name [(arglist)]
[statements]
[[Set] name = expression]
[Exit Property]
[statements]
[[Set] name = expression]
End Property
Parameters
Public
IndicatesProperty GetThe process can be accessed by other processes in all scripts.
Default
OnlyPublicKeyword used together, indicatingProperty GetThe attribute defined in the process is the default attribute of the class.
Private
IndicatesProperty GetThe process only defines itsClassOther processes in the block are accessible.
Name
Property GetThe name of the process. Follow the standard variable naming rules. The difference is that it can be the sameClassBlockProperty LetOrProperty SetProcess.
Arglist
The Variable list representsProperty GetThe parameter passed to the process when it is called. Multiple parameters are separated by commas.Property GetThe name of each parameter in the process must beProperty LetThe parameters in the process are the same (if any ).
Statements
Any group of statements will beProperty GetThe process is executed in the main body.
Set
When the object isProperty GetThe keyword used in the return value of the process.
Expression
The return value of the Property Get process.
Description
If Public or Private statements are not usedProperty GetBy default, processes are common, that is, they are visible to all other processes in the script.Property GetThe values of local variables in a process are not saved between different process calls.
The Property Get process cannot be defined within any other process (such as a Function or Property Let.
The Exit Property statement will immediately Exit the Property Get process. The program will continue to execute the program after the statement that calls the Property Get process. The Exit Property statement can appear in any position in the Property Get process, with no limit on the number of times.
AndSubAndProperty LetSimilar process,Property GetA process is a process that can accept parameters. It can execute a series of statements and change the value of parameters. HoweverSubAndProperty LetThe difference is that,Property GetThe process can be used to the right of the expression.FunctionOr return the property value in the same way as the property name.