I have a method:
add(int x,int y)
I also have:
int a = 5;
int b = 6;
string s = \"add\";
Is it poss
Use reflection - try the Type.GetMethod Method
Something like
MethodInfo addMethod = this.GetType().GetMethod("add");
object result = addMethod.Invoke(this, new object[] { x, y } );
You lose strong typing and compile-time checking - invoke doesn't know how many parameters the method expects, and what their types are and what the actual type of the return value is. So things could fail at runtime if you don't get it right.
It's also slower.