.NET Framework Components
The .NET framework is a collection of classes and the platform that runs your applications.
The .NET framework is made up of a number of components.
All .NET programs compil
e to Microsoft Intermediate Language (MSIL) or
Remember these key points about IL:
C# programs are compiled to IL.
IL is similar to Java's byte code.
IL allows for language interoperability.
IL allows platform independence.
The Common Language Runtime (CLR) executes IL code. The CLR is the
execution environment for all .NET applications.
The CLR is similar to the Java JVM (Java Virtual Machine).
The CLR provides a managed environment for code execution.
A managed en
vironment makes the code more secure by
protecting the code from doing things, such as illegal memory
A managed environment manages memory for the program.
A managed environment adds additional runtime support not
available in native p
rograms, like garbage collection.
The CLR executes IL code.
The CLR uses a Just In Time compiler (JIT) to compile
MSIL code to native code. The JIT considerably improves the
performance and speed of .NET programs.
The JIT is the
reason .NET program
s are fast.
The CLR provides a host of services to .Net applications, including:
Multi threading support
In order to support language interoperability, the .Net framework contains a
Common Type System (CT
S). The CTS defines types that are common to all
.NET languages. For example, Int32 is a common type. In C# this type is
referred to by using the
keyword, while Visual Basic .Net uses the
The .NET class libraries are pre
written classes that provide a rich
assortment of pre
All classes in the .NET libraries are organized into namespaces.
Most of the classes in the .NET library can be found in the
In .NET, an assembly is the small
est distributable unit.
Assemblies compile down to either a managed executable (.exe) or a
managed dll (.dll).
Assemblies contain the IL code pertaining to a dll or executable.
Assemblies have a resource file. This file contains resources such as
for the assembly to use.
Assemblies have Meta Data about the assembly.
Meta Data stores all of the necessary information to allow
other .Net assemblies to interact.
All of the information about an assembly available to the
compiler at compile time is ke
pt in the Meta Data.
This allows assemblies to use classes declared in other
This information can also be used by the programmer
at run time.