IVarPutSelf Function | |
Assign a value to an instance variable.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION IVarPutSelf(
oObject AS Object,
symInstanceVar AS STRING,
uValue AS USUAL
) AS USUAL
public static Usual IVarPutSelf(
Object oObject,
string symInstanceVar,
Usual uValue
)
Request Example
View SourceParameters
- oObject
- Type: Object
The object containing the instance variable. - symInstanceVar
- Type: String
The instance variable to assign a value to. - uValue
- Type: Usual
The value to assign to the instance variable.
Return Value
Type:
Usual
The value assigned to
symInstanceVar (
uValue).
Remarks
IVarPutSelf() assigns a value to a specific EXPORT or INSTANCE variable.
Examples
This example uses IVarPut() to assign a value to both EXPORT and INSTANCE variables.
1CLASS GetVars
2 EXPORT cName
3 INSTANCE cPhone
4 PROTECT cID
5 HIDDEN cPassWord
6FUNCTION Start()
7 LOCAL oVars AS OBJECT
8 oVars := GetVars{}
9 ? IVarPutSelf(oVars, #cName, "Adam")
10 ? IVarPutSelf(oVars, #cPhone, "4460")
See Also