C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
2
Reply
what are the components of CLR?
kodandaramaiah madala
16y
57.3k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
Introduction
CLR
is a Common Language Runtime . As the name suggests it's Common Runtime to all dotnet related languages like Vb,C#,VC++ ,J# etc.
When ever we compile any application in dotnet the corresponding langauge compiler will take care of it and convert into MSIL(Microsoft Intermediate Language) code , CLR will handle the code and convert into operating system native code with the help of JIT(Just In Time) compiler.There are many components in CLR which are used to do specific tasks or functions of CLR.
Functions of CLR
1.Convert IL code into Operating System native code
2. Execption handling
3. Type safety
4. Memory management.
5. Security etc.
Components in CLR
The above functionalities achieved by all these componets .Each component is responsible for specific functionality.
1.Class Loader:
It is used to load all the classes at runtime
2.MSIL to native Compiler:
It is a JIT (Just In Time) compiler it will convert MSIL code to native code
3.Code manager:
It manages the cade during runtime
4.Garbage Collector:
It manages memory .It collects all the unused objects in the memory and deallocate them when the memory is less.
5.Security Engine:
It has all the security restrictions.
6.Type checker:
It enforces strict type checking.
7.Thread support:
It provides multithreading support to our application.
8.Exception manager:
It provides mechanisum to handle execptions at runtime.
9.Debug Engine:
Which allows you to debug applications.
10.Com Marshaler:
Which allows interoperability to our applications
11.Base class library support:
Which provides all types that application need at runtime
Advantages of CLR and MSIL Code
Platform Independency
Architecture Independency
Language Independency
Managing the memory using Garbage Collector
Note:
CLS and CTS are the specifications not components of CLR
joe sri
16y
0
(1) Class Loader
(2) JIT (Just In Time) Compiler (compile IL code into machine code)
(3) Garbage Collector
(4) Execution Engine
Eranda Horanagama
16y
0
Message