Is it possible in .net, call a function at run time depending on ‘user’ input ?
Suppose i’ve a function called
private void MyFunction1() {
}
private void MyFunction2(String arg1, Double arg2) {
}
If a user write “MyFunction1” in a text box …the program will execute that function.
If yes, it works also with MyFunction2 with parameter passed by user ?
System.Reflection.MethodInfo info = Type.GetType(“ClassName”).GetMethod(“MethodName”);
In your case, “MethodName” would come from the user input.
Once you have your MethodInfo object, you call call Invoke on it.