GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET
Go To First  |  Previous Question  |  Next Question 
 ASP.NET  |  Question 144 of 164    Print  
how do you differentiate managed code and unmanaged code?

  
Total Answers and Comments: 4 Last Update: July 31, 2009     Asked by: priya 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Ashwin Pandey
 

Managed code :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

Unmanaged Code:Unmanaged code is what you use to make before Visual Studio .NET 2002 was released. Visual Basic 6, Visual C++ ,  It is compiled directly to machine code that ran on the machine where you compiled it—and on other machines as long as they had the same chip, or nearly the same. It didn't get services such as security or memory management from an invisible runtime; it got them from the operating system. And importantly, it got them from the operating system explicitly, by asking for them, usually by calling an API provided in the Windows SDK. More recent unmanaged applications got operating system services through COM calls.



Above answer was rated as good by the following members:
pandilakshmi.p
October 24, 2007 06:11:14   #1  
Ashwin Pandey        

RE: how do you differentiate managed code and unmanage...

Managed code :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

Unmanaged Code:Unmanaged code is what you use to make before Visual Studio .NET 2002 was released. Visual Basic 6 Visual C++ It is compiled directly to machine code that ran on the machine where you compiled it—and on other machines as long as they had the same chip or nearly the same. It didn't get services such as security or memory management from an invisible runtime; it got them from the operating system. And importantly it got them from the operating system explicitly by asking for them usually by calling an API provided in the Windows SDK. More recent unmanaged applications got operating system services through COM calls.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
December 05, 2007 01:43:15   #2  
parii Member Since: December 2007   Contribution: 30    

RE: how do you differentiate managed code and unmanaged code?
Managed Code is what Visual Basic .NET and C# compilers create. It compiles to Intermediate Language (IL) not to machine code that could run directly on your computer.Managed code runs in the Common Language Runtime.

Unmanaged code is what you use to make before Visual Studio .NET 2002 was released.It compiled directly to machine code that ran on the machine where you compiled it—and on other machines as long as they had the same chip or nearly the same.

 
Is this answer useful? Yes | No
July 22, 2009 09:35:37   #3  
srinivas.v72 Member Since: July 2009   Contribution: 2    

RE: how do you differentiate managed code and unmanaged code?
The Code which is under control of CLR is managed code and which is not unmanaged.
 
Is this answer useful? Yes | No
July 30, 2009 23:24:56   #4  
srinivas.v72 Member Since: July 2009   Contribution: 2    

RE: how do you differentiate managed code and unmanaged code?
The code which is under control of CLR (Common Language Runtime) is called managed code.

The code which takes Operating System help while execution is called unmanaged code.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape