by Dinesh Thakur Category: Object-oriented programming (OOP)

To hold the internal data of our class create private variables in the general declaration of the class modules. Then we have to deign which properties we want to write access. We can decide these things using property get and property let procedures.

 

A property get is like a function that returns the information about. The property let is like a procedure we can use to set information in the private variables.

The way that our class allows its property to be set is through property let property and to retrieve the value of a property from a class, we must use property get procedure.

The property let and property get procedure and retrieve the property value to provide member to the class module.

 

Syntax for get procedure:-

 

(Public) property get procedure_name(Optional argument list) as datatype

Statements in procedure

Procedure_name = property_name

End procedure

 

Property procedure are public by default, so we can omit the optional public keyword. We can also define a property to be private which means that the property is available only inside a class module.

 





About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.