It will be good if in readme or somewhere there was more detailed examples for noobs like me, because I can't find a way to read the method body.
maximum i've found an example (after spent much time in google), was this example:
foreach( var x in Mono.Reflection.Disassembler.GetInstructions( MethodBase.GetMethod("method-name-here") )){
PrintInstruction(x);
}
however, I cant understand what is the PrintInstruction at all or how to get method by it's name? (the above code is incorrect)?
1) i just want to output the result (string) in console.
2) I wished also example how to read as string from bytes[] returned by ... MethodBase.GetMethod("method-name-here").GetMethodBody().GetILAsByteArray()
It will be good if in readme or somewhere there was more detailed examples for noobs like me, because I can't find a way to read the method body.
maximum i've found an example (after spent much time in google), was this example:
however, I cant understand what is the
PrintInstruction
at all or how to get method by it's name? (the above code is incorrect)?1) i just want to output the result (string) in console. 2) I wished also example how to read as string from bytes[] returned by
... MethodBase.GetMethod("method-name-here").GetMethodBody().GetILAsByteArray()