What is the difference between managed and unmanaged code?

Answer Posted / charles

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.

Is This Answer Correct ?    25 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the sub types of ActionResult?

594


What is entity framework used for?

530


What is asp net framework?

522


What are non action methods in mvc?

553


mention what is the key advantage of using entity framework or ef?

562






What are the difference between asynchronous controller implementation between asp.net mvc 3 & asp.net mvc 4?

591


Can any particular component of .net framework 3.0 be removed?

531


what is datacontrols?

3109


Is the following route definition a valid route definition? {controller}{action}/{id}

765


What is the use of view model in asp.net mvc?

689


i have done enough testing in life but now stated developing intereset in development work,Can i think of entering into development work that too in >Net after more then 4 years of testing experiece?

1755


What are the versions of .net framework?

546


What you mean by routing in asp.net mvc?

547


List out few different return types of a controller action method?

616


Why to use “{resource}.axd/{*pathinfo}” in routing in mvc?

576