Managed code is a form of code written to take advantage of the features of a regulated runtime environment, like the CLR (Common Language Runtime) in the.NET Framework. Instead of being conducted directly by the windows OS, it is always carried out by the controlled runtime environment. The controlled runtime environment offers several functionalities to programs, including asgarbage collection, exception handling, type checking, bounds checking, and other functions that do not require human participation. It also provided a memory for the code, as well as type safety and other features.  Built-in languages for applications, such as Java, VB.Net, and others, are always directed at realtime environment services to control execution, and programs written in all of these languages generally considered as managed code.  In the.NET Framework scenario, the compiler always compiles the managed code in MSIL (Microsoft Intermediate Language) before building an executable. When the programmer executes the executable, the CLR's Just In Time (JIT) Compiler converts the intermediate language into native code specific to the architecture underlying. This method is executing in a controlled runtime execution environment, and the environment controls the functioning of the code.  The managed code is run as shown below, also with source code written in any .NET Framework language. Because managed code is converted into an intermediate representation; the JIT compiler converts this intermediate language into platform-independent instructions.