What is managed code in .NET?
Managed code run under the environment of CLR or .NET runtime. CLR execute this managed code.
.
In short all IL codes are managed code hence it is run under the control of CLR.
.
But if we are using component which is not built on .NET then such referenced codes are called unmanaged code since CLR does not have control over the execution of this referenced code.
.
For example, using of activex component built using VB 6.0 is unmanaged code in .NET.