Datasheet
Introducing C#
13
3.
When this code is executed (either in its own right if it is an executable, or when it is used
from other code) it must first be compiled into native code using a JIT compiler:
Native Code
JIT Compilation
Assembly
JIT Compilation
4. The native code is executed in the context of the managed CLR, along with any other running
applications or processes:
Native code
.NET CLR
System Runtime
Native code
Native code
Linking
There is one additional point to note concerning the above process. The C# code that compiles into MSIL
in step 2 needn't be contained in a single file. It is possible to split application code across multiple source
code files, which are then compiled together into a single assembly. This process is known as linking, and
is extremely useful. The reason for this is that it is far easier to work with several smaller files that one
enormous one. You can separate out logically related code into an individual file, so that it can be worked
on independently, and then practically forgotten about when completed. This also makes it much easier to
locate specific pieces of code when you need them, and enables teams of developers to divide up the
programming burden into manageable chunks, where individuals can "check out" pieces of code to work
on without risking damage to otherwise satisfactory sections, or sections that other people are working on.
What is C#?
C#, as mentioned above, is one of the languages that can be used to create applications that will run in
the .NET CLR. It is an evolution of the C and C++ languages and has been created by Microsoft
specifically to work with the .NET platform. As it is a recent development, the C# language has been
designed with hindsight, taking into account many of the best features from other languages while
clearing up their problems.