C# - How to use reflection run in memory with a winform -
i'm using code run file:
byte[] test = file.readallbytes("testfile.exe"); assembly = assembly.load(test); methodinfo m = a.entrypoint; var parameters = m.getparameters().length == 0 ? null : new[] { new string[0] }; m.invoke(null, parameters);
if in console application works charm. can execute other managed console windows or winforms. when enter code in windows form execute file in memory. following error:
system.invalidoperationexception: parameter count mismatch
Comments
Post a Comment