Convert a string to a method call
Posted on 2009-04-13
I have a form application with a "drop down list" and "Select button".
There are 3 functions
Is it possible to:
1) Convert method names to string so that these strings can be added to "drop down list" as "foo1", "foo2", "foo3"
2) Once a value is selected in the drop down, is it possible to change the selected string to method call:
i.e. "foo1" as foo1()
"foo2" as foo2()
"foo3" as foo3()
My basic understanding of C# says, it is not possible. But I want to find from experts, if there is a way to do this.