Support analog sharplab.io

Does the Jetbrains Rider have a plugin similar in behavior site sharplab.io? Now you can see IL code, but sometimes you need to see something in the middle source code and IL code

0
4 comments

Hello Careless6666,

Thank you for reaching Rider Forum.

Rider has its own IL Viewer. You may find it in Tools > IL Viewer.

Please let me know if you have any further questions.

 

0

My question was about something else. I know how to open IL viewer.

I'm talking about the following code transformation:

Source code in rider

var list = new System.Collections.Generic.List<int>(){1,2,3};

After transformation in sharplab.io (Roslyn rewrite)
List<int> list = new List<int>();
list.Add(1);
list.Add(2);
list.Add(3);
List<int> list2 = list;

After transformation in IL code

.maxstack 3
        .locals init (
            [0] class [System.Collections]System.Collections.Generic.List`1<int32> list
        )

        IL_0000: nop
        IL_0001: newobj instance void class [System.Collections]System.Collections.Generic.List`1<int32>::.ctor()
        IL_0006: dup
        IL_0007: ldc.i4.1
        IL_0008: callvirt instance void class [System.Collections]System.Collections.Generic.List`1<int32>::Add(!0)
        IL_000d: nop
        IL_000e: dup
        IL_000f: ldc.i4.2
        IL_0010: callvirt instance void class [System.Collections]System.Collections.Generic.List`1<int32>::Add(!0)
        IL_0015: nop
        IL_0016: dup
        IL_0017: ldc.i4.3
        IL_0018: callvirt instance void class [System.Collections]System.Collections.Generic.List`1<int32>::Add(!0)
        IL_001d: nop
        IL_001e: stloc.0
        IL_001f: ret

I ask about roslyn rewrite

0

Hey Careless6666,

Try tweaking the drop-down menu to a Low-Level C# in the IL Viewer drop-down?

 

0

Yes, that's what I need, thanks!

0

Please sign in to leave a comment.