differentiate between managed and unmanaged


Differentiate between managed and unmanaged code?

Managed code is the code that is implemented directly by the CLR instead of the operating system. The code compiler first compiles the managed code to intermediate language (IL) code, also known as MSIL code. This code doesn't depend on machine configurations and can be executed on dissimilar machines.

Unmanaged code is the code that is implemented directly by the operating system outside the CLR environment. It is directly compiled to native machine code which depends on the machine configuration.

In the managed code, as the execution of the code is governed by CLR, the runtime gives different services, like garbage collection, type checking, exception handling, and security support. These services help give uniformity in platform and language-independent behavior of managed code applications. In the unmanaged code, the allocation of memory, type safety, and security is required to be taken care of by the developer. If the unmanaged code is not properly handled, it may result in memory leak. Examples of unmanaged code are ActiveX components and Win32 APIs that implement beyond the scope of native CLR.

 

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: differentiate between managed and unmanaged
Reference No:- TGS0310698

Expected delivery within 24 Hours