zingmatter
05-07-2007, 10:12 AM
I'd like to be able to store function names in a database (the functions containing specific code that needs to be run on data in that record).
For example, a record contains a field: "functions" and for that record it contains: "myFunction1" (as a string). Is there a way of getting this and then running a function of the same name (other than just doing a switch statement).
Currently doing something like:
switch (strFunctionIn) {
case "myFunction1":
int someValue = myFunction1();
etc...
Any ideas? I reckon it can't be done but my C# isn't all that great so I may be missing something.
Thanks
For example, a record contains a field: "functions" and for that record it contains: "myFunction1" (as a string). Is there a way of getting this and then running a function of the same name (other than just doing a switch statement).
Currently doing something like:
switch (strFunctionIn) {
case "myFunction1":
int someValue = myFunction1();
etc...
Any ideas? I reckon it can't be done but my C# isn't all that great so I may be missing something.
Thanks