Managed Code
The resource, which is with in your application domain is, managed code. The resources that are within domain are faster.
The code, which is developed in .NET framework, is known as managed code. This code is directly executed by CLR with help of managed code execution. Any language that is written in .NET Framework is managed code.
Managed code uses CLR which in turns looks after your applications by managing memory, handling security, allowing cross - language debugging, and so on.
Unmanaged Code
The code, which is developed outside .NET, Framework is known as unmanaged code.
Applications that do not run under the control of the CLR are said to be unmanaged, and certain languages such as C++ can be used to write such applications, which, for example, access low - level functions of the operating system. Background compatibility with code of VB, ASP and COM are examples of unmanaged code.
Unmanaged code can be unmanaged source code and unmanaged compile code.
Unmanaged code is executed with help of wrapper classes.
Applicants in a .NET interview should be able to point out that all Intermediate Language (IL) is managed code. (See Question 15 below.) One difference between managed and unmanaged code is that Visual Basic and C# compiler create managed code in .NET, but the only way to get unmanaged code is to write the application in C or C++. Since the .NET compiler creates managed code, this type of code does not depend on the target machine’s architecture. The Common Language Runtime (CLR) executes it, and not the operating system (OS). In contrast, unmanaged code is dependent on the architecture of the target machine. It is executed directly by the OS and directly compiled to native machine code.
No comments:
Post a Comment