want to acess the value of the private variables declared in the class outside the class (in my agent)…Is there any way by which i can achieve this.I thought of creating a new Public get property which whill take parmater as the Varible name and pass the value to the agent which can be used generically as i may need many variable values…
below is just a simple eg as the original class is too complex and the variable values changes as per the functions called based on conditions…
Class abc
Private var1 as string
Private var2 as string
Private var3 as string
sub new (val as string)
if val=“1” then
func1
else
func2
end if
end sub
private function Func1
’ changes the values here …
me.var1=“hhh”
me.var2=“nnn”
end function
private function Func2
’ changes the values here …
me.var1=“98765”
me.var2=“12345”
end function
Public Property Get getPrivateVariable(VarName As Variant) As String
getPrivateVariable= Me.VarName
End Property
end class
Please suggest
Thanks in advance