IVarGetSelf Function | |
Return the contents of an instance variable.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION IVarGetSelf(
oObject AS Object,
symInstanceVar AS STRING
) AS USUAL
public static Usual IVarGetSelf(
Object oObject,
string symInstanceVar
)
Request Example
View SourceParameters
- oObject
- Type: Object
The object containing the instance variable. - symInstanceVar
- Type: String
The instance variable to get.
Return Value
Type:
Usual
The value of
symInstanceVar.
Remarks
IVarGetSelf() returns the contents of a specific EXPORT or INSTANCE variable.
The scope throughout the function call is SELF.
Examples
This example uses IVarGetSelf() to retrieve the contents of both EXPORT and INSTANCE variables:
1CLASS GetVars
2 EXPORT cName
3 INSTANCE cPhone
4 PROTECT cID
5 HIDDEN cPassWord
6CONSTRUCTOR CLASS GetVars
7 cName := "Adam"
8 cPhone := "4460"
9END CLASS
10
11FUNCTION Start()
12 LOCAL oVars AS OBJECT
13 oVars := GetVars{}
14 ? IVarGetSelf(oVars, #cName)
15 ? IVarGetSelf(oVars, #cPhone)
See Also Reference
IVarGetSelf(Object, String)