CHAPTER TWO
Introduction to .NET
10/28/2025
Topics
Introduction to .NET Framework
Components of .NET Framework
Architecture of .NET Framework
Design Principle of .NET Framework
Introduction to Visual Studio
[Link](Active server pages Network enabled
Technologies)
SDI And MDI Forms
Controls
10/28/2025
.NET Framework
.NET (Pronounced "Dot Net Framework“)
The .NET Framework is a software development platform developed by Microsoft.
.NET Framework is a platform that provides tools and technologies you need.
The objective of the .NET Framework is to provide a fully managed, object-oriented
environment where code can be executed reliably, securely, and without the performance
issues common in older interpreted languages.
.NET Framework is part of the .NET platform, a collection of technologies for building apps
for Linux, macOS, Windows, iOS, Android, and more.
First version .NET framework 1.0 in 2002
10/28/2025
Cont.…
It provides a controlled environment for developing and running applications,
including:-
Desktop, web based , and mobile applications.
To build Networked Applications and Distributed Web Services
Form-based Applications.
The .NET Framework supports more than 60 programming languages such as
C#, F#, [Link], J#, VC++, [Link], APL, COBOL, Python, Cobra, etc.
The software programs written in .NET are executed in the execution
10/28/2025
environment, which is called CLR (Common Language Runtime).
.NET Components
The architecture of the .Net framework is based on the following key components;
1. Common Language Runtime (CLR)
It is the foundational execution engine or Environment and virtual machine.
It is responsible for managing the execution of all .NET programs at runtime (often called
managed code), providing a highly consistent, secure, and reliable run-time environment.
It is a program execution engine that loads and executes the program.
Converts the program into native code.
Controls the interaction with the OS(Operating System).
It has other responsible:-
Garbage collection and Memory safety
Type safety
Exception Handling
Integrated security
10/28/2025
Garbage Collection(GC)
• Garbage Collection is the process of cleaning up unused memory inside the .NET
process.
• The CLR allocates memory into the managed heap when an object is created.
• Since memory is a finite resource, hence it needs to be freed up at some point in
time based on availability.
• i.e. GC is the component responsible for automatic memory management inside
of the CLR.
10/28/2025
Why Garbage Collection(GC)
The developer does not have to manage memory.
Memory allocation is efficient.
Provide more safety in terms of making
sure, one object cannot use content of the other.
Finds out and clean unused memory
automatically.
10/28/2025
.NET Framework
Common Language Runtime
The CLR defines the Common Type System (CTS), which is a standard
type system used by all .NET languages.
Type-safety
type safety is the extent to which a programming language
discourages or prevents type errors
Writing safe code also means to prevent data loss during
conversion of one type to another.
Memory management, etc...
Common Language Runtime
Operating System
10/28/2025 8
.NET Framework
Framework Class Library
Provides the core functionality of .Net Framework architecture .
It contains a huge library of reusable types. classes, interfaces, structures, and
enumerated values.
FCL organized in a hierarchical tree structure and it is divided into Namespaces.
Namespaces is a logical grouping of types for the purpose of identification.
The System Namespace is the root for types in the .NET Framework.
.NET Framework (Base Class Library)
Common Language Runtime
10/28/2025 Operating System
.NET Framework
Framework Class Library
Following are the commonly used namespaces:
Namespaces Description
It includes all common datatypes, string values, arrays
System
and methods for data conversion.
[Link], [Link], [Link], These are used to access a database, perform commands
[Link], [Link] on a database and retrieve database.
[Link], [Link],
These are used to access, read and write files.
[Link]
These namespaces are used to create Windows-based
[Link], [Link]
applications using Windows user interface components.
[Link], [Link],
These are used for authentication, authorization, and
[Link], [Link],
encryption purpose.
[Link]
10/28/2025
.NET Framework
Framework Class Library
.NET Framework Namespaces
10/28/2025
.NET Framework
[Link]
IT is a core data access technology in the .NET Framework used to interact with data
sources such as databases, XML files, and web services.
It provides a bridge between your application and a data source, enabling operations
like retrieving, inserting, updating, and deleting data.
Also, It allows connection to data sources for retrieving, manipulating, and updating
data.
It provides access to data sources like SQL server, OLE DB((Object Linking and
Embedding, Database).), XML etc…
ADO .NET and XML
.NET Framework (Base Class Library)
Common Language Runtime
10/28/2025
Operating System
.NET Framework
[Link] & Windows Forms
Create application’s front-end – Web-based user interface, Windows
GUI, Web services, etc.…
IIS(Internet Information Services ) -execute an ASP. Net application.
IIS can be used to host, deploy, and manage web applications using technologies
such as [Link] and PHP.
ASP .NET Windows
Web Forms Web Services
Forms
Mobile Internet Toolkit
ADO .NET and XML
.NET Framework (Base Class Library)
Common Language Runtime
10/28/2025
[Link]
Web Technology
Rich set of [Link] server controls
Framework for building Web applications and Web services in any .NET
language
– C#, C++, [Link], JScript, etc.
[Link] is a part of Microsoft .Net platform.
[Link] is used to produce interactive,
data-driven web applications
over the internet.
10/28/2025
Common Language Specification (CLS)
CLS is a set of basic language features that .Net Languages needed to develop
Applications and Services , which are compatible with the .Net Framework
Ensures complete interoperability among applications, regardless of the language
used to create the application.
CLS defines a subset of Common Type System (CTS) .
CTS describes a set of types that can use different .Net languages have in common ,
which ensure that objects written in d/t languages can interact with each other.
CTS provides base set of Data Types which is responsible for cross language
integration.
10/28/2025
Common Type System(CTS)
CTS is a rich type system built into the CLR
Implements various types (int, float, string, …)
which is responsible for cross language integration
Isa standard which defines
» How the types are declared, used and managed
»Basic data types that IL(Intermediate Language ) understands
For Example,
• CTS defines a type int32, an integral data type of 32 bit which is mapped by C#
through int and [Link] through its Integer datatype
10/28/2025
Con…
i.e. CLR can load and execute the source code written in any .NET language, only if the
type is described in the CTS.
What Common Language Specification
CLS is a set of specifications that all languages and libraries need to follow
Guaranteed your code to be usable in any other .NET language
Ensure interoperability between languages
• command-line interface: A platform-independent development system from Microsoft that
enables programs written in different programming languages to run on different types of hardware .
C# CLS [Link]
CLI CTS
CLR/CTS
CLS Fortran
10/28/2025
Cont…
• CTS Main Goals
• Language Interoperability – allows different .NET languages to share
data.
• Type Safety – ensures that all operations on data types are valid.
• Consistent Behavior – all .NET languages behave the same way for the
same data types.
10/28/2025
Common Language Specification
implementation of language integration.
Common Language Specification
ASP .NET Windows
Web Forms Web Services Forms
Mobile Internet Toolkit
ADO .NET and XML
.NET Framework (Base Class Library)
Common Language Runtime
10/28/2025
Operating System
Programming Languages
Use your favorite language
Languages provided
C++ C# VB Perl J# … by Microsoft
Common Language Specification – C++, C#, J#,
ASP .NET [Link], Jscript…
Windows
Web Forms Web Services
Forms Third-parties
Mobile Internet Toolkit languages
ADO .NET and XML – Perl, Python,
Pascal, APL,
.NET Framework (Base Class Library) COBOL, Eiffel,
Haskell, ML, …
Common Language Runtime Advanced multi-
Operating System
language features
10/28/2025
Visual Studio .NET
Visual Studio is a powerful and customizable programming environment
that contains all the tools you need to build programs quickly and
efficiently.
Is a fully featured software package which supports more than 60
programming language.
The Visual Studio
Environment
10/28/2025
Visual Studio .NET
.NET Framework Architecture
C++ C# VB Perl J# …
Common Language Specification
Visual Studio .NET
ASP .NET Windows
Web Forms Web Services
Forms
Mobile Internet Toolkit
ADO .NET and XML
.NET Framework (Base Class Library)
Common Language Runtime
Operating System
10/28/2025
.NET Framework Design Principle
Interoperability
Language interoperability is the ability of code to interact with code that
is written using a different programming language.
It can help maximize code reuse.
Example: application built on an older version Net framework, say 2.0,
executed without problem in 3.5.
Portability
Applications built on the .Net framework can be made to work on any
Windows platform.
10/28/2025
Con…
Security
The .NET Framework has a good security mechanism.
is used to grant the user access to the code.
Memory management
Automatic memory management is one of the services that the CLR
provides during Managed Execution.
The capability to see those resources, which are not used by a running
program.
The garbage collector runs at regular intervals and keeps on checking
which system resources are not utilized.
10/28/2025
Con…
Language independence-
The .NET Framework is language independent.
Simplified deployment
Type-Safety
Type-safe code cannot perform an operation on an object that is invalid for
that object.
prevents type errors, data loss during conversion of one type to another
10/28/2025
Multiple Language Support
Microsoft Intermediate Language – MSIL
Are not compiled to machine code. But they are compiled to an IL.
IL (MSIL) – Intermediate Language, Common Intermediate Language(CIL)
During the compile time , the compiler convert the source code into MSIL .
When a compiler produces MSIL, it also produces Metadata.
MSIL includes
instructions for loading, storing, initializing, and calling methods on
objects, as well as
instructions for arithmetic and logical operations,
control flow, direct memory access, exception handling, and other
10/28/2025e operations
Microsoft Intermediate Language - MSIL
Itis low-level (machine) language, like Assembler, but is Object-
oriented
MSIL is a CPU-independent set of instructions.
CLR accepts the IL code and recompile into machine code. The
recompilation is called meaning it is done as soon as a function is called.
CLR's Just
in Time(JIT) compiler converts the IL code into native code to
the Operating System.(CIL).
10/28/2025
Code Compilation and Execution
Compilation
Also called
Source Language Code
MSIL Assembly
Code Compiler Metadata
- First time each
method is called
Execution
Native JIT - Install time
Code Compiler precompilation
10/28/2025
SDI and MDI
Microsoft Foundation Class Library (MFC) makes it easy to work with
both single-document interface (SDI) and multiple-document interface
(MDI) applications.
SDI applications allow only one open document frame window at a
time.
MDI applications allow multiple document frame windows to be open
in the same instance of an application.
10/28/2025
Difference Between SDI and MDI
SDI MDI
• should not be container • is a container administration
administration. • cope many applications at a time
• cope only one software program at a
time.
• SDI exists independently
• stand-alone
10/28/2025
Controls
• Controls are small building blocks of the graphical user interface,
which include text boxes, buttons, check boxes, list boxes, labels,
and other tools.
Control Name Applicable Events Description
Label None It is used to display text.
TextBox TextChanged It is used to create a text input in the form.
Button Click, Command It is used to create a button.
It is used to create a button that looks similar to the
LinkButton Click, Command
hyperlink.
It is used to create an imagesButton. Here, an image works
ImageButton Click
as a Button.
DropDownList SelectedIndexChanged It is used to create a dropdown list control.
10/28/2025
ListBox SelectedIndexCnhaged It is used to create a ListBox control like the HTML control.
THE END
Thanks for YOUR ATTENTION!
Any Question