Closed AlexanderRodecape closed 5 years ago
Sorry, can you add an example of how to call a method with multiple parameters?
How should the objectOfParameters be created? objectCalledUpon.CallMethod(methodInfo.Name, objectOfParameters);
Looks like I just needed to add the parameters to a list List list = new List(); // loop through parameters/get your params Type type = methodProperty.ParameterType; var prop= Convert.ChangeType(your-value, type); list.Add(prop); // end loop var array = list.ToArray();
Sorry, can you add an example of how to call a method with multiple parameters?
How should the objectOfParameters be created? objectCalledUpon.CallMethod(methodInfo.Name, objectOfParameters);