How can I invoke a method with parameters?
I have this:
List<String> methods = new List<String>(new List<String>{ "first", "second" });
int number = 4;
String text = "Hi";
bool isTrue = false;
And want to invoke the method like this:
if (isTrue)
Invoke(methods[0], number);
else if (!isTrue)
Invoke(methods[1], { number, text });
Is it possible?