Chapter-1
Chapter-1
1. INTRODUCING C#
frame
Layer 3 ADO.NET XML
Layer 4 BCL/FCL
CLR
O.S
The layer1 specifies the supporting languages of .NET. .NET framework provides set of
languages. It supports 30+ languages. Here programmer has a choice of choosing
programming language based on his choice.
The Layer 2 specifies types of applications. It allows the developers to create and
execute various types of applications such as console, windows forms, WPF applications,
Web applications and web services.
ADO.NET acts as mediator between front end and back end of an application. By using
this store data permanently on data base.
BCL/ FCL: (Base Class Library/ Framework Class Library)
BCL
Garbage Collection:is one of the most important features of managed code is the concept
of garbage collection. It is used to provide the automatic memory management feature.
Garbage collection is a method of making sure that the memory used by an application is
freed up completely when the application is no longer in use.
Prior to .NET this was the responsibility of Programmers. .NET garbage Collector works
periodically by inspecting the memory of your computer and removing anything from it
that is no longer needed.
Assemblies: When we compile an application, the MSIL code is stored in an assembly. it
includes both executable application files that we can run directly from windows without
the need for any other programs. These have extension .exe file. And libraries which have
.dll extension for used by other application.
In .NET, every application is compiled into an assembly which refers to a portable
executable (PE) file.
The PE file can be either dynamic link library (DLL) or an executable (.exe) that contains
the MSIL code of the compiled application.
In addition to the MSIL, assembly also includes files and resources that are necessary for
application also known as metadata.
Meta information enables assemblies to be full self-descriptive.
At runtime, the CLR load the metadata into memory and finds information about the
Code's Classes, members and so on.
3. When this code is executed , it must first be compiled in to native code using a JIT Compiler
4. The native code is executed in the context of the managed CLR , along with other running
applications.
Linking: The C# code that compiles into CIL need not be contained in a single file. It's 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.
What is C#?
1. It is one of the language can use to create the application that will run into .NET CLR
2. It is created by Micro Soft specially to work with .NET platform.
3. Developing application using C# is simpler than using C++, because the syntax is simpler.
Applications can be written With C#
1. Console Applications
2. Window Applications
3. Web Applications and
4. Web Services