[Mono-devel-list] a method's code array

Jonathan Pryor jonpryor at vt.edu
Thu Mar 18 17:59:02 EST 2004


Below..

On Thu, 2004-03-18 at 15:57, Bart Van Rompaey wrote:
> Is there some library which gets you the code array (in hex) for the
> methods in a class? I've been searching in System.Reflection and
> System.Reflection.Emit. I can get all kind of metadata there and with
> Emit you can genereate method bodies by supplying byte arrays, but I
> can't find a method to get existing byte code.

Do you mean that actual CIL code for the method body?  There is no
standard way to retrieve that information.

You might take a look at "monodis", which uses a C library to do this. 
Monodis is in the "mono" CVS repository, in the "mono/dis" directory.

 - Jon





More information about the Mono-devel-list mailing list