【发布时间】:2012-02-05 11:23:56
【问题描述】:
如何使用MethodInfo.Invoke 将参数作为引用传递?
这是我要调用的方法:
private static bool test(string str, out byte[] byt)
我试过了,但失败了:
byte[] rawAsm = new byte[]{};
MethodInfo _lf = asm.GetType().GetMethod("test", BindingFlags.Static | BindingFlags.NonPublic);
bool b = (bool)_lf.Invoke(null, new object[]
{
"test",
rawAsm
});
返回的字节为空。
【问题讨论】:
标签: c# reflection methodinfo