ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories >> Software >> Microsoft-Related >> Dot-Net >> Dot-Net-Framework
 
 
 
Question
What is the difference between managed and unmanaged code?
 Question Submitted By :: Siddharth
I also faced this Question!!     Rank Answer Posted By  
 
Answer
Code that is executed by the CLR. Managed code provides 
information (i.e., metadata) to allow the CLR to locate 
methods encoded in assembly modules, store and retrieve 
security information, handle exceptions, and walk the 
program stack. Managed code can access both managed data 
and unmanaged data. Managed data—Memory that is allocated 
and released by the CLR using Garbage Collection. Managed 
data can only be accessed by managed code


2.Code that targets the common language runtime, the 
foundation of the .NET Framework, is known as managed code; 
code that does not target the common language runtime is 
known as unmanaged code. You can think of the runtime as an 
agent that manages code at execution time, providing core 
services such as memory management, thread management, and 
remoting, while also enforcing strict type safety in the 
code. The concept of code management is a fundamental 
principle of the runtime. 

3.Managed code supplies the metadata necessary for the CLR 
to provide services such as memory management, cross-
language integration, code access security, and automatic 
lifetime control of objects. All code based on IL executes 
as managed code. 

4.Code that executes under the CLI execution environment. 
Managed code uses the execution environment for memory 
management, object lifetime, and the basic type-system, 
among other fundamental services.
 
3
Charles
 
View All Answers
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com