SlideShare a Scribd company logo
2
Most read
4
Most read
6
Most read
Common language
runtime CLR
M.SandhiyaM.SC(IT)
Department of CS&IT
Nadar Saraswathi College of Arts
Science Theni
Common Language
Runtime (CLR)
• Net Framework: provides runtime environment called Common
Language Runtime (CLR).It provides an environment to run all the
Programs. The code which runs under the CLR is called as Managed
Code. Programmers need not to worry on managing the memory if
the programs are running under the CLR as it provides memory
management and thread management.
Programmatically, when our program needs memory, CLR allocates
the memory for scope and de-allocates the memory if the scope is
completed.
Language Compilers (e.g. C#, VB.Net, J#) will convert the
Code/Program to Microsoft Intermediate Language (MSIL) intern
this will be converted to Native Code by CLR. See the below Fig.
Native code
Net Framework Class
Library (FCL)
• This is also called as Base Class Library and it is common for all types of applications i.e. the way you access
the Library Classes and Methods in VB.NET will be the same in C#, and it is common for all other languages
in .NET.
The following are different types of applications that can make use of net class library.
• 1. Windows Application.
• 2. Console Application
• 3. Web Application.
• 4.XML Web Services.
• 5.Windows Services.
In short, developers just need to import the BCL in their language code and use its predefined methods and
properties to implement common and complex functions like reading and writing to file, graphic rendering,
database interaction, and XML document manipulation. Below are the few more concepts that we need to
know and understand as part of this Net framework.
Common Type System (CTS)
It describes set of data types that can be used in different Net languages in common. (i.e.) CTS ensures that
objects written in different .NET languages can interact with each other. For Communicating between
programs written in any .NET complaint language, the types have to be compatible on the basic level.
Common Type System (CTS)
 It describes set of data types that can be used in different .Net languages in common.
(i.e), CTS ensures that objects written in different
 Net languages can interact with each other.For Communicating between programs
written in any .
 NET complaint language, the types have to be compatible on the basic level.
common type system
The common type system supports two general categories of types:
• Value types:
Value types directly contain their data, and instances of value types are
either allocated on the stack or allocated inline in a structure. Value
types can be built-in (implemented by the runtime), user-defined, or
enumerations.
Reference types:
Reference types store a reference to the value's memory address, and
are allocated on the heap. Reference types can be self-describing types,
pointer types, or interface types. The type of a reference type can be
determined from values of self-describing types. Self-describing types
are further split into arrays and class types. The class types are user-
defined classes, boxed value types, and delegates.
CommonLanguageSpecification(CLS)
• It is a sub set of CTS and it specifies a set of rules that needs to
be adhered or satisfied by all language compilers targeting
CLR.
• It helps in cross language inheritance and cross language
debugging.
Common language runtime
Common language specification
Rules:
• It describes the minimal and complete set of features to produce code
that can be hosted by CLR. It ensures that products of compilers will
work properly in .NET environment.
• Sample Rules:
• 1. Representation of text strings
• 2. Internal representation of enumerations
• 3. Definition of static members and this is a subset of the CTS which
all .NET languages are expected to support.
• 4. Microsoft has defined CLS which are nothing but guidelines that
language to follow so that it can communicate with other .NET
languages in a seamless manner.
• Below mentioned the .Net Architecture stack for easy understanding.
The components of CLR includes
• Class Loader: This loads classes into the runtime.
• MSIL to native code compiler: This converts MSIL code into native code.
• Code manager: This manager the code during execution i.e provides code check,
the resources it needs during execution.
• Garbage Collector: provide automatic memory management and avoid memory
leaks.
• Security Engine: This enforces security restrictions and CAS.
• Type Checker: This enforces strict type checking.
• Thread Support: This provides multithreading support to applications.
• Exception Manager : This provides a mechanism to handle the run-time
exceptions.
• Debug Engine : Allow you to debug different type of applications.
• COM marshaler : This allows .net application to exchange data with COM
applications.
• BASE Class library : This provides the types the applications needed at runtime.
runtime
Main components of CLR
• Common Language Specification (CLS)
• Common Type System (CTS)
• Garbage Collection (GC)
• Just In – Time Compiler (JIT)
Common Language Specification (CLS):
• It is responsible for converting the different .NET programming
language syntactical rules and regulations into CLR understandable
format. Basically, it provides the Language Interoperability. Language
Interoperability means to provide the execution support to other
programming languages also in .NET framework.
Language Interoperability can be achieved in two ways :
Managed Code: The MSIL code which is managed by the CLR is known as
the Managed Code. For managed code CLR provides three .NET facilities:
CAS(Code Access Security)Exception HandlingAutomatic Memory
Management.
Common language runtime clr
Benefits of CLR:
• It improves the performance by providing a richly interact between programs at the run
time.
• Enhance portability by removing the need of recompiling a program on any operating
system that supports it.
• Security also increases as it analyzes the MSIL instructions whether they are safe or
unsafe. Also, the use of delegates in place of function pointers enhance the type safety
and security.
• Support automatic memory management with the help of Garbage Collector.
• Provides cross-language integration because CTS inside CLR provides a common
standard that activates the different languages to extend and share each other’s libraries.
• Provides support to use the components that developed in other .NET programming
languages.
• Provide language, platform, and architecture independency.
• It allows the creation of the scalable and multithreaded applications in an easier way as a
developer has no need to think about the memory management and security issues.
•
Language Interoperability can
be achieved in two ways :
Managed Code: The MSIL code which is managed by the CLR is
known as the Managed Code. For managed code CLR
provides three .
CAS(Code Access Security)Exception HandlingAutomatic Memory
Management.
Unmanaged Code: Before .NET development the programming
language like . Components & Win32 API do not generate the
MSIL code. So these are not managed by CLR rather managed
by Operating System which is called unmanaged code.
Common Type System (CTS):
• Every programming language has its own data type system, so CTS
is responsible for the understanding all the data type system of .
• NET programming languages and converting them into CLR
understandable format which will be a common format.
• There are 2 Types:
• CTS
• NET programming language

More Related Content

PPT
.NET Framework Overview
PPTX
Microsoft dot net framework
PPSX
Introduction to .net framework
PPTX
Components of .NET Framework
PPT
Introduction To Dotnet
PPT
Architecture of net framework
PPT
Architecture of .net framework
PPTX
What is dotnet (.NET) ?
.NET Framework Overview
Microsoft dot net framework
Introduction to .net framework
Components of .NET Framework
Introduction To Dotnet
Architecture of net framework
Architecture of .net framework
What is dotnet (.NET) ?

What's hot (20)

PDF
Dbms 14: Relational Calculus
PPTX
Operators in java
PPTX
Basic Concepts of OOPs (Object Oriented Programming in Java)
PPT
screen output and keyboard input in js
PDF
Java I/o streams
PPT
Java interfaces
PPTX
Peephole optimization techniques in compiler design
PPTX
Inheritance in java
PPTX
Decomposition using Functional Dependency
PPTX
Validation Controls in asp.net
PDF
Lecture 01 introduction to compiler
PPTX
Deadlock ppt
PPTX
Java Server Pages(jsp)
PPTX
Church Turing Thesis
PDF
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
PPT
Exception Handling in JAVA
PPSX
Exception Handling
PDF
Arrays in Java
Dbms 14: Relational Calculus
Operators in java
Basic Concepts of OOPs (Object Oriented Programming in Java)
screen output and keyboard input in js
Java I/o streams
Java interfaces
Peephole optimization techniques in compiler design
Inheritance in java
Decomposition using Functional Dependency
Validation Controls in asp.net
Lecture 01 introduction to compiler
Deadlock ppt
Java Server Pages(jsp)
Church Turing Thesis
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Exception Handling in JAVA
Exception Handling
Arrays in Java
Ad

Similar to Common language runtime clr (20)

DOCX
.Net framework components by naveen kumar veligeti
DOCX
Chapter 1 introduction to .net
PPTX
Session2 (3)
PPTX
Architecture in .net
PPTX
Introduction to dot net framework
PPTX
.Net Framwork Architecture And components
PPT
.Net overview|Introduction Of .net
PDF
Inside.Net
PPT
Net framework
PPTX
Synapse india sharing info on dotnet framework part2
PPTX
Chapter1_Part1.pptx
PPTX
.Net slid
PPSX
Introductionto .netframework by Priyanka Pinglikar
PPT
.Netframework
PPTX
C# Common Type System & Common Language Specification
PPT
.NET Overview
PDF
Microsoft .NET Platform
PPTX
election survey comapny in delhi|election survey company|election survey comp...
PPT
1.Philosophy of .NET
PPT
C# wrokig based topics for students in advanced programming
.Net framework components by naveen kumar veligeti
Chapter 1 introduction to .net
Session2 (3)
Architecture in .net
Introduction to dot net framework
.Net Framwork Architecture And components
.Net overview|Introduction Of .net
Inside.Net
Net framework
Synapse india sharing info on dotnet framework part2
Chapter1_Part1.pptx
.Net slid
Introductionto .netframework by Priyanka Pinglikar
.Netframework
C# Common Type System & Common Language Specification
.NET Overview
Microsoft .NET Platform
election survey comapny in delhi|election survey company|election survey comp...
1.Philosophy of .NET
C# wrokig based topics for students in advanced programming
Ad

More from SanSan149 (11)

PPTX
Sdma fdma-tdma-fixed tdm
PPTX
Histogram process spatial filtering
PPTX
Mobile computing vani
PPTX
Telecommunication system gms mobile service
PPTX
Adaptive filters and band reject filters
PPTX
Hema rdbms
PPTX
SDMA-FDMA-TDMA-fixed TDM
PPTX
joins and subqueries in big data analysis
PPTX
Hadoop storage
PPTX
Normalization
PPTX
Manageral aspects of software maintance
Sdma fdma-tdma-fixed tdm
Histogram process spatial filtering
Mobile computing vani
Telecommunication system gms mobile service
Adaptive filters and band reject filters
Hema rdbms
SDMA-FDMA-TDMA-fixed TDM
joins and subqueries in big data analysis
Hadoop storage
Normalization
Manageral aspects of software maintance

Recently uploaded (20)

PDF
01-Introduction-to-Information-Management.pdf
PDF
Insiders guide to clinical Medicine.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Pre independence Education in Inndia.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Basic Mud Logging Guide for educational purpose
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
master seminar digital applications in india
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Complications of Minimal Access Surgery at WLH
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
01-Introduction-to-Information-Management.pdf
Insiders guide to clinical Medicine.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
RMMM.pdf make it easy to upload and study
Pre independence Education in Inndia.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
VCE English Exam - Section C Student Revision Booklet
Module 4: Burden of Disease Tutorial Slides S2 2025
O7-L3 Supply Chain Operations - ICLT Program
Final Presentation General Medicine 03-08-2024.pptx
Renaissance Architecture: A Journey from Faith to Humanism
Basic Mud Logging Guide for educational purpose
TR - Agricultural Crops Production NC III.pdf
master seminar digital applications in india
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Complications of Minimal Access Surgery at WLH
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf

Common language runtime clr

  • 1. Common language runtime CLR M.SandhiyaM.SC(IT) Department of CS&IT Nadar Saraswathi College of Arts Science Theni
  • 2. Common Language Runtime (CLR) • Net Framework: provides runtime environment called Common Language Runtime (CLR).It provides an environment to run all the Programs. The code which runs under the CLR is called as Managed Code. Programmers need not to worry on managing the memory if the programs are running under the CLR as it provides memory management and thread management. Programmatically, when our program needs memory, CLR allocates the memory for scope and de-allocates the memory if the scope is completed. Language Compilers (e.g. C#, VB.Net, J#) will convert the Code/Program to Microsoft Intermediate Language (MSIL) intern this will be converted to Native Code by CLR. See the below Fig.
  • 4. Net Framework Class Library (FCL) • This is also called as Base Class Library and it is common for all types of applications i.e. the way you access the Library Classes and Methods in VB.NET will be the same in C#, and it is common for all other languages in .NET. The following are different types of applications that can make use of net class library. • 1. Windows Application. • 2. Console Application • 3. Web Application. • 4.XML Web Services. • 5.Windows Services. In short, developers just need to import the BCL in their language code and use its predefined methods and properties to implement common and complex functions like reading and writing to file, graphic rendering, database interaction, and XML document manipulation. Below are the few more concepts that we need to know and understand as part of this Net framework. Common Type System (CTS) It describes set of data types that can be used in different Net languages in common. (i.e.) CTS ensures that objects written in different .NET languages can interact with each other. For Communicating between programs written in any .NET complaint language, the types have to be compatible on the basic level.
  • 5. Common Type System (CTS)  It describes set of data types that can be used in different .Net languages in common. (i.e), CTS ensures that objects written in different  Net languages can interact with each other.For Communicating between programs written in any .  NET complaint language, the types have to be compatible on the basic level.
  • 6. common type system The common type system supports two general categories of types: • Value types: Value types directly contain their data, and instances of value types are either allocated on the stack or allocated inline in a structure. Value types can be built-in (implemented by the runtime), user-defined, or enumerations. Reference types: Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types. The type of a reference type can be determined from values of self-describing types. Self-describing types are further split into arrays and class types. The class types are user- defined classes, boxed value types, and delegates.
  • 7. CommonLanguageSpecification(CLS) • It is a sub set of CTS and it specifies a set of rules that needs to be adhered or satisfied by all language compilers targeting CLR. • It helps in cross language inheritance and cross language debugging.
  • 9. Common language specification Rules: • It describes the minimal and complete set of features to produce code that can be hosted by CLR. It ensures that products of compilers will work properly in .NET environment. • Sample Rules: • 1. Representation of text strings • 2. Internal representation of enumerations • 3. Definition of static members and this is a subset of the CTS which all .NET languages are expected to support. • 4. Microsoft has defined CLS which are nothing but guidelines that language to follow so that it can communicate with other .NET languages in a seamless manner. • Below mentioned the .Net Architecture stack for easy understanding.
  • 10. The components of CLR includes • Class Loader: This loads classes into the runtime. • MSIL to native code compiler: This converts MSIL code into native code. • Code manager: This manager the code during execution i.e provides code check, the resources it needs during execution. • Garbage Collector: provide automatic memory management and avoid memory leaks. • Security Engine: This enforces security restrictions and CAS. • Type Checker: This enforces strict type checking. • Thread Support: This provides multithreading support to applications. • Exception Manager : This provides a mechanism to handle the run-time exceptions. • Debug Engine : Allow you to debug different type of applications. • COM marshaler : This allows .net application to exchange data with COM applications. • BASE Class library : This provides the types the applications needed at runtime.
  • 12. Main components of CLR • Common Language Specification (CLS) • Common Type System (CTS) • Garbage Collection (GC) • Just In – Time Compiler (JIT) Common Language Specification (CLS): • It is responsible for converting the different .NET programming language syntactical rules and regulations into CLR understandable format. Basically, it provides the Language Interoperability. Language Interoperability means to provide the execution support to other programming languages also in .NET framework. Language Interoperability can be achieved in two ways : Managed Code: The MSIL code which is managed by the CLR is known as the Managed Code. For managed code CLR provides three .NET facilities: CAS(Code Access Security)Exception HandlingAutomatic Memory Management.
  • 14. Benefits of CLR: • It improves the performance by providing a richly interact between programs at the run time. • Enhance portability by removing the need of recompiling a program on any operating system that supports it. • Security also increases as it analyzes the MSIL instructions whether they are safe or unsafe. Also, the use of delegates in place of function pointers enhance the type safety and security. • Support automatic memory management with the help of Garbage Collector. • Provides cross-language integration because CTS inside CLR provides a common standard that activates the different languages to extend and share each other’s libraries. • Provides support to use the components that developed in other .NET programming languages. • Provide language, platform, and architecture independency. • It allows the creation of the scalable and multithreaded applications in an easier way as a developer has no need to think about the memory management and security issues. •
  • 15. Language Interoperability can be achieved in two ways : Managed Code: The MSIL code which is managed by the CLR is known as the Managed Code. For managed code CLR provides three . CAS(Code Access Security)Exception HandlingAutomatic Memory Management. Unmanaged Code: Before .NET development the programming language like . Components & Win32 API do not generate the MSIL code. So these are not managed by CLR rather managed by Operating System which is called unmanaged code.
  • 16. Common Type System (CTS): • Every programming language has its own data type system, so CTS is responsible for the understanding all the data type system of . • NET programming languages and converting them into CLR understandable format which will be a common format. • There are 2 Types: • CTS • NET programming language