I would like to know how i can launch a .NET assembly from a byte array with parameters. I do not want to write it to the disk first. Could anyone give me an example on how to do this? Thank you.
问问题
1776 次
3 回答
5
This should do the trick.
Assembly program = Assembly.Load(ASSEMBLY_BYTES);
string[] args = new string[] { "-s" };
program.EntryPoint.Invoke(null, new object[] { args });
于 2013-03-30T22:36:37.677 回答
1
There is a method: Assembly.Load(Byte[])
.
于 2013-03-30T19:28:58.623 回答
0
I asked the question on another forum and they were able to help me, this is what i was looking for;
Assembly program = Assembly.Load(ASSEMBLY_BYTES);
string[] args = new string[] { "-s" };
program.EntryPoint.Invoke(null, new object[] { args });
于 2013-03-30T23:18:12.540 回答