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

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -