.Net Framework Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 3034 Page Views: 

Explain CLR (Common Language Runtime) and its functionalities?



Posted By: Avi Date: 30 November 2009 03:42:09 PM
 Answer:

Common Language Runtime (CLR) is the engine available in .Net Framework to compile and run the program. CLR engine does not compile the code in machine code but converts the code in a set of instructions called Microsoft Intermediate Language (MSIL). This MSIL is one of the section of Portable Executable (PE) file, the other being Metadata. PE file automatically get generated when you compile the program code.

The conversion of the program code to MSIL by CLR engine, makes .Net platform and language independent. Although at present, Microsoft does not have CLR engines for other platforms, in future you can find .Net application being compiled in UNIX or Linux operating system. After the conversion of the program code to MSIL, the code is then translated to native or machine code. Instead of compiling the program code at development time, the MSIL code gets translated 'just in time' (JIT) by JIT compilers.

CLR helps developers in managing both allocation and deallocation of memory. This removes two of the largest sources of programmer error: leaks and memory corruption.

CLR is also helpful for security purposes. CLR provide permissions to a component based on what process it runs in, validates the code based on evidence such as information about code at load time and the website from which component was obtained to assign permissions on a component-by-component basis. Moreover, CLR checks the code to see if it has been manipulated. The metadata in a CLR component can contain a digital signature that can be used to verify that the component was written by genuine person and that it has not been modified.


Posted By: eTechPlanet


Date: 30 November 2009 03:42:09 PM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image odLbkQ
Related Questions
.Net Framework : What is the syntax to inherit from a class in C#?

What is the syntax to inherit from a class in C#?

Place a colon and then the name of the base class. For Example: class ChildClass : BaseClass { }
Category: .Net Framework Date: 8/28/2009 6:47:02 AM
.Net Framework : Does C# support multiple-inheritance?

Does C# support multiple-inheritance?

No
Category: .Net Framework Date: 8/28/2009 6:45:21 AM
.Net Framework : What is reflection in .Net?

What is reflection in .Net?

Discovering class information at runtime.
Category: .Net Framework Date: 8/25/2009 9:46:41 PM
.Net Framework : For what purpose Boxing is used in .Net?

For what purpose Boxing is used in .Net?

Boxing is used to convert value type to reference type
Category: .Net Framework Date: 8/25/2009 9:39:47 PM
.Net Framework : What is Global Assembly Cache (GAC)?

What is Global Assembly Cache (GAC)?

Global assembly cache contains shared assemblies that are globally accessible to all .net applicatio....
Category: .Net Framework Date: 8/22/2009 7:39:06 AM