Try OpenEdge Now
skip to main content
ABL Reference
Class Properties and Methods Reference : GetVariable( ) method
 

GetVariable( ) method

Returns a Progress.Reflect.Variable instance describing the class variable that matches the specified conditions. If there is no matching variable, the method returns the Unknown value (?).
Return type: Progress.Reflect.Variable class
Access: PUBLIC
Applies to: Progress.Lang.Class class

Syntax

GetVariable ( INPUT variable-name AS CHARACTER )

GetVariable ( INPUT variable-name AS CHARACTER,
INPUT flags AS Progress.Reflect.Flags )
variable-name
A CHARACTER expression that evaluates to the name of the variable.
flags
A Progress.Reflect.Flags instance indicating the access mode(s), scope(s), and/or class level(s) the returned variable must have. See Progress.Reflect.Flags enumeration for more information.

Notes

*GetVariable(variable-name) only returns public, non-static variables. GetVariable(variable-name, flags) does return ABL class variables defined as protected, private, and/or static if they satisfy the specified conditions, although you cannot get or set the values of any private or protected variables that are returned. A private variable will only be returned if it is defined in the given class; a private variable inherited from a super class will not be returned.
*This method does not return .NET class fields defined as private.