Search code examples
c#linqpad

Is LINQPad's IL code the optimized version?


LINQPad has a tab near the results to show the IL of the C# statements you're running. I'm wondering if this is the optimized "Release" version of the code vs. the unoptimized "Debug" build of the code.

Perhaps there is a simple way to check by writing a small code snippet or something?


Solution

  • This is controlled by preferences ("Edit" → "Preferences"), so it's up to you :)

    enter image description here

    In addition, the preference can be toggled with the keyboard shortcut Shift + Alt + o, or by clicking the "/o-" or "/o+" option in the bottom right of the UI.

    enter image description here