Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The usage of Property Let statement in VBS

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "the usage of Property Let sentences in VBS". In daily operation, I believe many people have doubts about the usage of Property Let 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 usage of Property Let sentences in VBS". Next, please follow the editor to study!

In the Class block, declare the name, parameters, code, and so on, which form the body of the Property process that assigns (sets) values.

[Public | Private] Property Let name (

[arglist,] value

)

[statement]

[Exit Property]

[statement]

End Property

Parameter Public

Indicates that the Property Let procedure can be accessed by all other procedures in all scripts.

Private

Indicates that Property Let procedures can only be accessed by other procedures within the defined Class block.

Name

The name of the Property Let procedure; follows the standard variable naming convention, except that its name can be the same as the Property Get or Property Set procedure in the same Class block.

Arglist

The list of variables represents the parameters that are passed to the Property Let procedure when called. Multiple parameters are separated by commas. The name of each parameter in the Property Let procedure must be the same as the corresponding parameter in the Property Get procedure. In addition, the Property Let process always has one more parameter than the corresponding Property Get process. This parameter is the value assigned to the attribute.

Value

This variable contains the value to assign to the attribute. When the procedure is called, this parameter appears to the right of the calling expression.

Statement

Any set of statements that will be executed within the body of the Property Let procedure.

Note that each Property Let statement must define at least one parameter for the defined attribute. This parameter (the last parameter when there are multiple parameters) contains the value to be assigned to the attribute when the Property Let statement is called. This parameter is called value in the previous syntax.

Description

If not explicitly specified using Public or Private, Property Let procedures are made public by default, that is, they are visible to all other procedures within the script. The values of local variables in Property Let procedures are not saved between different procedure calls.

Property Let procedures cannot be defined within any other process, such as Function or Property Get.

The Exit Property statement causes an immediate exit from the Property Let procedure. The program continues execution from the point after the statement that called the Property Let procedure. Exit Property statements can appear anywhere in the Property Let procedure for any number of times.

Similar to the Function and Property Get procedures, the Property Let procedure is a separate procedure that accepts parameters, executes a series of statements, and changes the values of parameters. However, unlike the Function and Property Get procedures, both return a value, while the Property Let procedure can only be used on the left side of the attribute assignment expression.

At this point, the study of "the use of Property Let 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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report