Correct. The C# code is converted to MSIL, which is the assembly language that .NET's virtual machine understands. The MSIL is then compiled to machine code using Just-in-time compilation.
The process is done not just when you press F5. It is a very long process, when you build the project, at that moment
C# source code is compiled to assemblies, the byte codes, then
those assemblies are executed by .NET's virtual machine, using JIT compilation. It is not required to always use JIT to compile the MSIL to native code also. Because if you want to only compile the code (build it) and not run it, Visual Studio will only build the assemblies for you. Which are present under the
/build/ folder.
It is a long process, when compiler compiles the code to MSIL, it also creates the meta-data. Because meta-data defines what your code is, how it should be executed and so on and so forth.
You should consider giving these MSDN a look:
1.
Compiling to MSIL[
^]
2.
Compiling MSIL to Native Code[
^]
These resources will help you understand the process. Also there is another method, which only provides you with the assembly code. Not the MSIL code. For that, debug your application, set a breakpoint to pause the application. Once application hits the breakpoint. Go to Debug --> and under Window, show Disassembly. It would show you the code for this!
That code would be assembly language code. Read this MSDN guide for learning "
How to: Use the Disassembly Window[
^]".