Common Language Runtime

By: Jesse Miller

The .NET Framework consists of three main components they are common language runtime, .NET Framework Base Classes and the user and program interfaces.

The Common Language Runtime (CLR) is one of the essential components of the .NET Framework. CLR is the environment where all programs using .NET technologies are executed.

It provides services such as code compilation, memory allocation, and garbage collection. The CLR allows the execution of code across different platforms by translating code into Intermediate Language (IL).

IL is a low level language that the CLR understands. IL is converted into machine level language during execution by the Just-In-Time (JIT) compiler. During JIT compilation, code is also checked for type safety.

Type safety ensures that objects are always accessed in a compatible way. An 8-byte value to a variable of size 4 bytes, the CLR will detect and trap such an attempt.

CLR consists of a set of common rules followed by all the languages of the .NET Framework. This set of rules is known as Common Language Specification (CLS). CLS enables an object or application to interact with the objects or applications of other languages.

The classes that follow the rules specified by CLS are termed as CLS-complaint classes. The classes defined in the .NET Framework class library are CLS-Compliant.

One of the specifications defined in CLS is Common Type System (CTS), which provides a type system that is common across all languages. CTS define how data types are declared, used, and managed in the code at run time.

The CTS also defines the rules that ensure that the data types of objects written in various languages are able to interact with each other. The size of integer and long variables is the same across all CLS-complaint programming languages. While executing the program, the CLR plays an important role.

The source code consists of instructions for the compiler, and an executable program consists of instructions for the processor. Therefore, compilation converts source code to machine language.

The conversion of source code to machine level language happens in two stages. In the first stage, the compiler translates code into an IL instead of machine level or assembly level language. In the second stage the conversion of IL to machine language is done at runtime by the JIT compiler.

Quick Note: Taking the Nonsense out of looking for the right spyware remover

If you really want to take the work out of looking for that right Spyware Protection from a go to the Internet and get a or a Free
Download, In order to prevent your vital information from being ripped from your computer get your Remover Today.

The source code always gets translated into IL. During the process of compilation, the compiler also produces metadata about code.

Computers
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 

» More on Computers