0% found this document useful (0 votes)
31 views8 pages

UNIT-I .Net and C#

.NET Framework is a software development framework created by Microsoft, first released in 2000, that supports multiple programming languages and is used for developing applications across various platforms. Its core components include the Common Language Runtime (CLR), Framework Class Library (FCL), and various core languages and modules. Key features of the framework include Just-In-Time compilation, garbage collection for automatic memory management, and a base class library that provides essential functionalities for application development.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views8 pages

UNIT-I .Net and C#

.NET Framework is a software development framework created by Microsoft, first released in 2000, that supports multiple programming languages and is used for developing applications across various platforms. Its core components include the Common Language Runtime (CLR), Framework Class Library (FCL), and various core languages and modules. Key features of the framework include Just-In-Time compilation, garbage collection for automatic memory management, and a base class library that provides essential functionalities for application development.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

.

Net Framework & C#


(According to Swami Vivekanand Subharti University Syllabus)

BCA 602-B

By :
Mr. Ankit Kumar
Unit – 1
The .Net Framework
Introduction–
• .NET is a framework to develop software applications. It is designed and
developed by Microsoft and the first beta version released in 2000.
• It is used to develop applications for web, Windows, phone.
Moreover, it provides a broad range of functionalities and support.
• This framework contains a large number of class libraries known as
Framework Class Library (FCL). The software programs written in .NET are
executed in the execution environment, which is called CLR (Common
Language Runtime). These are the core and essential parts of the .NET
framework.
• The .Net Framework supports more than 60 programming languages such
as C#, F#, VB.NET, J#, VC++, JScript.NET, APL, COBOL, Perl, Oberon, ML,
Pascal, Eiffel, Smalltalk, Python, Cobra, ADA, etc.

The .NET Framework is composed of four main components:

• Common Language Runtime (CLR)


• Framework Class Library (FCL),
• Core Languages (WinForms, ASP.NET, and ADO.NET), and
• Other Modules (WCF, WPF, WF, Card Space, LINQ, Entity Framework,
Parallel LINQ, Task Parallel Library, etc.)

Common Language Run Time–


It is a program execution engine that loads and executes the program. It
converts the program into native code. It acts as an interface between the
framework and operating system. It does exception handling, memory
management, and garbage collection. Moreover, it provides security,
typesafety, interoperability, and portability. A list of CLR components are given
below:

Common Type System–


• The Common Type System (CTS) is a standard for defining and
using data types in the .NETframework. CTS defines a collection
of data types, which are used and managed by the run time to
facilitate cross-language integration.
• CTS provide the types in the .NET Framework with which .NET
applications, components and controls are built in different
programming languages so information is shared easily.

Common Language Specification–


• The Common Language Specification (CLS) is a fundamental set
of language features supported by the Common Language
Runtime (CLR) of the .NET Framework.
• CLS is a part of the specifications of the .NET Framework. CLS
was designed to support language constructs commonly used by
developers and to produce verifiable code, which allows all CLS-
compliant languages to ensure the type safety of code.

The base class library–

• .NET Framework Class Library is the collection of classes,


namespaces, interfaces and value types that are used for .NET
applications.
• It contains thousands of classes that support the following
functions.
o Base and user-defined data types
o Support for exceptions handling
o input/output and stream operations
o Communications with the underlying
system
o Access to data
o Ability to create Windows-based GUI
applications
o o Ability to create web-client and server
applications o Support for creating web
services
• .NET Base Class Library is the sub part of the Framework that
provides library support to Common Language Runtime to work
properly. It includes the System namespace and core types of the
.NET framework.
The .Net class Library intermediate language–
• Intermediate language (IL) is an object-oriented programming language
designed to be used by compilers for the .NET Framework before static or
dynamic compilation to machine code. The IL is used by the .NET
Framework to generate machine-independent code as the output of
compilation of the source code written in any .NET programming
language.
• IL is a stack-based assembly language that gets converted to bytecode
during execution of a virtual machine. It is defined by the common
language infrastructure (CLI) specification. As IL is used for automatic
generation of compiled code, there is no need to learn its syntax.

Just in time compilation–


• Just-In-Time compiler (JIT) is a part of Common Language Runtime
(CLR) in .NET which is responsible for managing the execution of .NET
programs regardless of any .NET programming language.
• A language-specific compiler converts the source code to the intermediate
language. This intermediate language is then converted into the machine
code by the Just-In-Time (JIT) compiler. This machine code is specific to
the computer environment that the JIT compiler runs on.

Working of JIT Compiler: The JIT compiler is required to speed up the code
execution and provide support for multiple platforms. Its working is given as
follows:

Garbage Collection–
Garbage Collection–
• Automatic memory management is made possible by Garbage Collection
in .NET Framework. When a class object is created at runtime, certain
memory space is allocated to it in the heap memory. However, after all
the actions related to the object are completed in the program, the
memory space allocated to it is a waste as it cannot be used. In this case,
garbage collection is very useful as it automatically releases the memory
space after it is no longer required.

• Garbage collection will always work on Managed Heap and internally it


has an Engine which is known as the Optimization Engine.
Garbage Collection occurs if at least one of multiple conditions is satisfied. These
conditions are given as follows:
o If the system has low physical memory, then garbage collection is
necessary.
o If the memory allocated to various objects in the heap memory
exceeds a pre-set threshold, then garbage collection occurs.
o If the GC.Collect method is called, then garbage collection occurs.
However, this method is only called under unusual situations as
normally garbage collector runs automatically.
Phases in Garbage Collection

There are mainly 3 phases in garbage collection. Details about these are given as
follows:
1. A list of all the live objects is created during the marking

2.

3.

original order.

You might also like