C # String representation of a method

Is there a way in .NET 3.0 (or earlier) to get a string representation of a method? I know that I can get an array of IL bytes from the MethodBody object, but I'm interested in getting a string that essentially represents the body of the method, as it seems to my eyes in VS.

I tried in the CodeDom namespace to find out if there is a way to convert methods to CodeMemberMethods at runtime, but so far I have come to the end.

Any thoughts?

+5
source share
2 answers

This is a very difficult job. Basically, you would like to rewrite the reflector in your code ... and don't forget that not all ILs can be the other way around.

: ", ".

( ) .

+12

API- ( , , Red Gate ).

, , , , , .

, , .

+2

All Articles