- Home /
Understanding compiled code
I've been using ILSpy recently to dig more deeply into the IL of my code and try to understand it. In ILSpy I can switch between IL and C#... when I was first looking at this I thought that the C# code was just my code after the compiler rewrites the syntactic sugar, but the closer I look at it, the more I see things that clearly don't have the syntactic sugar removed (like lambda expressions). So my question is... what exactly is that C# code I'm looking at in ILSpy? It's similar to mine, but slightly different in various ways. Is that the C# code decompiled from the IL?
I want to see what the compiler does when it removes my syntactic sugar, so I can better understand the language, but it seems that this C# code in ILSpy isn't quite what I'm looking for.