I have a byte[]
that contains bytes that represents a method in assembly. For example a simple mov eax,1
- retn
function:
var method = new byte[] { 0xB8,0x01,0x00,0x00,0x00,0xC3 };
Is it possible to create, in runtime, a method that I can call in C# using the byte array to create it?