Creates a virtual reference to a property of an object.
Ref := PropRef(Obj, Name , Args*)
PropRef itself is a class derived from Any.
Any object.
Type: String
The property's name.
Zero or more arguments for an indexed property. For example, a reference to Obj.Prop[A, B] can be represented by PropRef(Obj, "Prop", A, B).
Type: PropRef
This function returns a virtual reference corresponding to the property; that is, an object with a __Value property which retrieves or sets the value of the target property. This can be passed to a ByRef parameter.
| Property | Description |
|---|---|
Target | The object containing the referenced property. |
Name | The referenced property name. An item reference uses __Item. |
Args | An Array containing the indexed-property arguments, or an empty Array for a non-indexed property. |
These properties are read-only.
In most cases, directly using this class is not recommended. Instead, use the reference operator to retrieve a reference to a property (via the __Ref method).
However, this function can also be used with ComValue and derived types, or to bypass any custom __Ref implementation.