Definitions for "Managed code"
Code executed and managed by the Microsoft® .NET Framework, specifically by the .NET Framework's common language runtime. Managed code must supply the information necessary for the common language runtime to provide services such as memory management, cross-language integration, code access security, and automatic lifetime control of objects. All code based on Microsoft Intermediate Language executes as managed code.
Code that is executed by the common language runtime environment rather than directly by the operating system. Managed code applications gain common language runtime services such as automatic garbage collection, runtime type checking and security support, and so on. These services help provide uniform platform- and language-independent behavior of managed-code applications. See also: unmanaged code.
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.