我正在通过反射调用一个类型的方法,该方法需要几个参数:
var myType = typeof(myClass);
var myMethod = myType.GetMethod("myMethodInClass",
new[] { typeof(string), typeof(string) });
myMethod.Invoke(?, new object[] { "", "" });
我希望目标是 IDataReader,这是该方法将返回的内容,但我显然无法实例化接口的新实例。