In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "the use of Property Get sentences in VBS". In daily operation, I believe many people have doubts about the use of Property Get sentences in VBS. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "the use of Property Get sentences in VBS". Next, please follow the editor to study!
In the Class block, declare the name, parameters, and code of the body that makes up the attribute procedure used to get (return) the value.
[Public [Default] | Private] Property Get name [(arglist)]
[statements]
[[Set] name = expression]
[Exit Property]
[statements]
[[Set] name = expression]
End Property
Parameter 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 property defined in the Property Get procedure is the default property of the 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; follows standard variable naming conventions, except that it can be the same as a Property Let or Property Set procedure in the same Class block.
Arglist
This list of variables represents the parameters passed to the Property Get procedure when it is called. 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 used when the object is used as the return value of the Property Get procedure.
Expression
The return value of the Property Get procedure.
Description
If you do not explicitly declare using Public or Private, Property Get procedures are public by default, that is, they are visible to all other procedures in the script. The values of local variables in Property Get procedures are not saved between different procedure calls.
Property Get procedures cannot be defined within any other process, such as Function or Property Let.
The Exit Property statement causes an immediate exit from the Property Get procedure. The program will continue to execute the program after the statement that calls the Property Get procedure. Exit Property statements can appear anywhere in the Property Get procedure for any number of times.
Similar to Sub and Property Let procedures, Property Get procedures are procedures that accept parameters, execute a series of statements, and change the values of parameters. However, unlike Sub and Property Let, the Property Get procedure can be used on the right side of the expression to return the value of the property in the same way as using Function or attribute names.
At this point, the study of "the use of Property Get sentences in VBS" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.