Let's say you write an app in C#, VB, anything with .NET When you hit build, does it really compile your code? I thought so until I started using redgates 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 IL (Intermediary Language) and when execution occurs, it is loading in the CLR? Is it optimized during CLR only and never at build time?