[C# Tip] Reflection: How to Invoke Method with parameters

在城里 (2017-04-16 07:49:58) 评论 (0)

using System.Reflection;

MethodInfo mi = classInstance.GetType().GetMethod(methodString);
result = methodInfo.Invoke(classInstance, parametersArray);

2017.04.16