G
Guest
i have the following case
a MyClass class has
method with 2 arguments as
void SetProp(string varname,string varvalue);
in MyClass i have following members
string stdname,stddate,stdbirth,stdloc
from other class i created object from MyClass ,
MyClass obj = new MyClass();
obj.SetProp("stdname","George Asper");
what i need to achieve inside SetProp when I get to evaluate varname string
to the local memeber variable name, means
SetProp(string varname,string val)
{
evaluate(varname) = val;
//the string varname will be evaluated to local class variable and set
its relative value, is this possible? hope i explain what i need well?
}
a MyClass class has
method with 2 arguments as
void SetProp(string varname,string varvalue);
in MyClass i have following members
string stdname,stddate,stdbirth,stdloc
from other class i created object from MyClass ,
MyClass obj = new MyClass();
obj.SetProp("stdname","George Asper");
what i need to achieve inside SetProp when I get to evaluate varname string
to the local memeber variable name, means
SetProp(string varname,string val)
{
evaluate(varname) = val;
//the string varname will be evaluated to local class variable and set
its relative value, is this possible? hope i explain what i need well?
}