By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,026 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

How to invoke function from its string representation

P: n/a
What are my options to invoke function (method) in this case:
myclass{

private DataSet _userData;

//Property in the class:
public DataSet UserData (string dsource){
get {return _userData;}
set {
_userData=??
}
}
}
Where dsource="MyAssembly.MyClass.GetUserData(uID)" and
MyAssembly.MyClass.GetUserData is static method of DataSet type.

Any references to good articles are greatly appreciated.
Thank you,
IK

Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Take a look at Reflection. It allows to to invoke anything at runtime.

"IKdev" <IK***@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
What are my options to invoke function (method) in this case:
myclass{

private DataSet _userData;

//Property in the class:
public DataSet UserData (string dsource){
get {return _userData;}
set {
_userData=??
}
}
}
Where dsource="MyAssembly.MyClass.GetUserData(uID)" and
MyAssembly.MyClass.GetUserData is static method of DataSet type.

Any references to good articles are greatly appreciated.
Thank you,
IK

Nov 16 '05 #2

P: n/a
Yes, I've thought about it, but I was trying to find simpler solution,
something similar to VB .NET eval() function.

Thank you,
IK
"Peter Rilling" wrote:
Take a look at Reflection. It allows to to invoke anything at runtime.

"IKdev" <IK***@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
What are my options to invoke function (method) in this case:
myclass{

private DataSet _userData;

//Property in the class:
public DataSet UserData (string dsource){
get {return _userData;}
set {
_userData=??
}
}
}
Where dsource="MyAssembly.MyClass.GetUserData(uID)" and
MyAssembly.MyClass.GetUserData is static method of DataSet type.

Any references to good articles are greatly appreciated.
Thank you,
IK


Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.