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

invoke a method from a string?

P: n/a
All,
I am wondering if there is a way to invoke a method from a string?
Any pointers in the right direction would be appreciated.
string s = "someMethod";
invoke(s);
thanks,
Vince
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Vince,

The Reflection API provides rich support for this kind of operation. The
following link provides an overview of reflection.
http://msdn.microsoft.com/library/de...onoverview.asp

These are articles which talk more about reflection with sample code.
http://samples.gotdotnet.com/QuickSt...oc/Invoke.aspx
http://msdn.microsoft.com/library/de...et02262002.asp

Hope this helps.
--
Jeffrey Wynn
so********@nospam.net

"Vince Apesa" <va****@hotmail.com> wrote in message
news:a8**************************@posting.google.c om...
All,
I am wondering if there is a way to invoke a method from a string?
Any pointers in the right direction would be appreciated.
string s = "someMethod";
invoke(s);
thanks,
Vince

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.