For my previous post I needed to see the IL and that was the time to try some of the new decompilers that are out there. I was thinking dotpeek by jetbrains and justdecompile by telerik.

God knows I love dotpeek. So it was the first I tried. Dotpeek is still early access so far from ready. The install experience is none existing. You download the zipfile, unzip it. And then doubleclick on the exe to start it (if you can’t find it, it’s under the d for dotpeek).

So first I created a project and compiled it.

This is the code.

vb.net
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Module Module1
 
    Sub Main()
        Dim array1() As Integer
        Dim array2(-1) As Integer
        Dim array3(0) As Integer
        Dim array4(1) As Integer
        Dim array5() As Integer = {}
        Dim array6() = New Integer() {}
 
        ReDim array1(-1)
 
        Console.WriteLine(array1.Count)
        Console.WriteLine(array2.Count)
        Console.WriteLine(array3.Count)
        Console.WriteLine(array4.Count)
        Console.WriteLine(array5.Count)
        Console.WriteLine(array6.Count)
 
        Console.ReadLine()
    End Sub
 
End Module
Module Module1
 
    Sub Main()
        Dim array1() As Integer
        Dim array2(-1) As Integer
        Dim array3(0) As Integer
        Dim array4(1) As Integer
        Dim array5() As Integer = {}
        Dim array6() = New Integer() {}
 
        ReDim array1(-1)
 
        Console.WriteLine(array1.Count)
        Console.WriteLine(array2.Count)
        Console.WriteLine(array3.Count)
        Console.WriteLine(array4.Count)
        Console.WriteLine(array5.Count)
        Console.WriteLine(array6.Count)
 
        Console.ReadLine()
    End Sub
 
End Module

I then decompiled with dotpeek.

This was the result.

So it decompiles just fine. However it only decompiles to C# and not IL. And it felt kind of slow.

I needed IL so I downloaded justdecompile.

The install experience is very nice for justdecompile. Apart from the fact that it tries to install other software on my machine.

Look for “Why not try these” and uncheck them if you don’t want them.

And then you have to fill in this.

That’s really annoying.

But it installed. Now it was time to try it.

This the C# code it produced.

This is the IL.

And as an added bonus, this is the Visual basic.

Don’t think it was much faster than dotpeek but it had what I needed.

So I think justdecompile had what I needed today. But keeping both around seems like the right thing to do.

Not that I need decompilers all that often.