Let's say you write an application in C#, VB.NET, anything with .NET. When you hit build, does it really compile your code? I thought so until I started using Redgate's reflector on some of my assemblies and saw my code verbatim. I would have expected loops to be unrolled and another plethora of optimizations, instead nothing.
So when does the compilation actually happen? I think when it is built, code become CIL (Intermediary Language) and when execution occurs, it is loading in the CLR? Is it optimized during CLR only and never at build time?
When you compile in VS
When you execute:
I post the answer here too as the other question was not really about this...