Converting IL to C# code

Don't reinvent the wheel; use Lutz Roeder's .NET Reflector.


The Lutz Roeder reflector was purchased and is no longer available for free download.

There is now a free (once again) tool called ILSpy. I've found it to be very good, and it will not only generate C# code from IL but will also create a .csproj project if decompiling an entire DLL assembly.


Re-Inventing the wheel surely a better way to learn! you will have to create your own class that would convert iL to C#.This requires the knowledge of Intermediate language.

I assume you have already converted the Byte Array to IL instructions just like we see in ildasm.exe,Using Reflection.Emit.OpCodes,OpCode.OperandType,BitConvertor.ReadByte(),BitConvertor.ReadInt32 etc.

Tags:

C#

.Net