tags:

views:

290

answers:

2

I'm working on a static analysis tool for .NET assembly. In Java, there is a Descriptor which can be used to represent method or field in a string with specified grammar.

for field:

double d[][][];

will be

[[[D

It's useful especially when doing bytecode analysis. Coz it's easy to describe. If there a similar thing in .NET CLR? Or is there a better way to achieve this? Thanks!

+2  A: 

I've done a lot of static analysis in .NET CIL last year and the best way to go is to use ildasm.exe or any disassembler that will give you some quite easy to parse IL language text file. You will find, there is no need to reverse-engineer anything and you will find that .NET is not that compiled.

Here is a good book recommendation if you are serious with IL Assembler: Expert .NET 2.0 IL Assembler

Vincent
A: 

Hey, thanks Vincent. I'm now using a class to represent "return type+parameters list" info instead of a descriptor in string. Thanks for the book you recommended. Yes, I use ildasm.exe and to read the internal of an assembly. And in my project I use Cecil to digg everything out.

Sun Liwen
You can also try using this reflector:http://www.red-gate.com/products/reflector/It is free I think, it used to be the best reflector until its author abandonned it recently.
Vincent
:) I use it. And I use Mono.Cecil in my code to read information from assemblies.
Sun Liwen